-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-40418: Release Management GitHub Action #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, it took me a while to digest things (and seeing the workflow in action on lsst-dm/next_visit_fan_out#9 was indeed useful).
My main concern is the unclear relationship between ci-release
and build-service
, and the policy decisions that follow from that. Is ci-release
meant to replace build-service
(if so, why did you create a new script from scratch instead of just injecting support for tag refs into the old one?), or is it meant to be a supplement (if so, why does it run on anything other than tags/releases)? I'd prefer the former, just to be sure that we're really building things the same way for both testing and production.
Either way, we need to clean up how latest
base containers are handled before a release workflow that always uses latest
is safe to merge.
- "tickets/**" | ||
- "u/**" | ||
tags: | ||
- "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use push:tags
instead of release:published
? As far as I can tell the only difference would be if somebody pushed a tag that doesn't have a corresponding release, but the latter seems more direct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do keep push:tags
, would it be useful to filter on tags that look like version numbers, to guard against somebody pushing non-release tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make a copy of Dockerfile.activator
instead of renaming it (and updating build-service
to match, of course)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the Dockerfile is not an input parameter to the composite GitHub Action. It is a best practice to give each container its own sub-directory and to not re-name the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, but you didn't create subdirectories either.
I don't think it's a good idea to have two identical Dockerfiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. The two identical Dockerfiles are there for co-existence.
I will update the base container workflow and add a sub directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the base Dockerfile to a new base directory. Removed the redundant Dockerfile.activator and updated the build service GitHub Action.
doc/playbook.rst
Outdated
@@ -65,6 +65,29 @@ Any subsequent builds of the service container will build against both bases. | |||
|
|||
This is the only situation in which a change to ``BASE_TAG_LIST`` should be committed to ``main``. | |||
|
|||
Release Procedure | |||
----------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a subsection of "Containers" rather than another top-level section? It's true that the containers are what we're versioning, but if I were looking at the table of contents I wouldn't have thought to look here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved Release instructions to a subsection of Containers. Thanks for suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? My question was because it was a subsection of Containers to begin with...
doc/playbook.rst
Outdated
Releases are largely automated through GitHub Actions (see the `ci-release.yaml <https://github.com/lsst-dm/prompt_processing/actions/workflows/ci-release.yaml>` workflow file for details). When a semantic version tag is pushed to GitHub, Prompt Processing Docker images are published on GitHub and Docker Hub with that version. | ||
|
||
Regular releases happen from the ``main`` branch after changes have been merged. | ||
From the ``main`` branch you can release a new major version (``X.0.0``), a new minor version of the current major version (``X.Y.0``), or a new patch of the current major-minor version (``X.Y.Z``). Release tags are semantic version identifiers following the :pep:`440` specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try following the PEP 440 link, it throws up a warning saying the document is no longer current. Should this be a link to https://packaging.python.org/en/latest/specifications/version-specifiers/ instead?
It's worth noting that the compatibility implications of semantic versioning are buried pretty far down the page (https://packaging.python.org/en/latest/specifications/version-specifiers/#compatible-release). But GitHub doesn't seem to have any documentation beyond the paragraph that shows up on the New Release page, and I assume you deliberately avoided linking to semver.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the purpose of distinguishing between major and minor versions, does compatibility mean:
For Prompt Processing,
- ability to read fanned-out
nextVisit
messages - schema compatibility of APDB inputs/outputs and Alert Stream outputs
- any in-code assumptions about the version(s) of the central Butler repo, but no requirements regarding dataset types, pipeline contents, etc.
For fan-out,
- ability to read incoming Summit messages
- schema compatibility of fanned-out messages
The question of compatibility for fanned-out messages is a bit problematic because, so long as we're just dumping them into a Python dataclass, almost any change is incompatible: removing a field will give an error unless the client provides a default, as usual for schemas, but adding a field will give an error unconditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed link to pep. Also updated instructions to use X.Y.Z
for releases without prepending v
to be consistent with other release numbering schemes used by LSST.
doc/playbook.rst
Outdated
2. Tag the release | ||
|
||
At the HEAD of the ``main`` branch, create and push a tag with the semantic version: | ||
|
||
.. code-block:: sh | ||
|
||
git tag -s vX.Y.Z -m "vX.Y.Z" | ||
git push --tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed on next_visit_fan_out
that this step is not necessary -- publishing the release triggers the push:tags
listeners.
@@ -65,6 +65,29 @@ Any subsequent builds of the service container will build against both bases. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Stable Base Containers" section above this point assumes that the latest
base is used for ongoing development, while production builds should use BASE_TAG_LIST
if necessary.
If the responsibility for production builds is shifting from build-service
to ci-release
, then maybe we should do it the other way around and require that latest
refer to a "known good" container (which is what we've done in practice instead of messing around with BASE_TAG_LIST
). This would require changing automatic runs of build-base
to not set the latest
tag (in practice almost all latest
bases are built manually, so this is mostly a safety net).
0c9161a
to
8f6af3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore the PROMPT_PROCESSING_DIR
definition at the minimum; the service will not work if this is not an absolute path. I'm happy to help with testing.
I've made a few other suggestions as well (in particular, please squash all fixup-type commits before final merge).
@@ -60,14 +60,14 @@ jobs: | |||
echo "Eups tag = $(< eups.tag)" | |||
- name: Build image | |||
# Context-free build | |||
working-directory: base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment refers to the run:
block, so the new line should go above it.
Or, as I understand it, this change means the build is no longer context-free and the comment should be removed? Reversed in a fixup commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to move the deletion of Dockerfile.activator
to "Add Dockerfile for activator", so that it's clear to anyone reviewing the history that it's a move/rename rather than a creation?
doc/playbook.rst
Outdated
However, it may happen that the ``latest`` base is used for development while production runs should use an older build. | ||
If this comes up, edit ``.github/workflows/build-service.yml`` and append the desired base build to the ``BASE_TAG_LIST`` variable. | ||
Any subsequent builds of the service container will build against both bases. | ||
To build a release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now I see what happened. No, I think releases should have their own heading (whether a top-level section, or a subsection like before). All the instructions for different things get jumbled together otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved release management to its own section.
doc/playbook.rst
Outdated
Releases are largely automated through GitHub Actions (see the `ci-release.yaml <https://github.com/lsst-dm/prompt_processing/actions/workflows/ci-release.yaml>` workflow file for details). When a semantic version tag is pushed to GitHub, Prompt Processing Docker images are published on GitHub and Docker Hub with that version. | ||
|
||
Regular releases happen from the ``main`` branch after changes have been merged. | ||
From the ``main`` branch you can release a new major version (``X.0.0``), a new minor version of the current major version (``X.Y.0``), or a new patch of the current major-minor version (``X.Y.Z``). Release tags are semantic version identifiers following the :pep:`440` specification. | ||
Regular releases happen from the ``main`` branch after changes have been merged. From the ``main`` branch you can release a new major version (``X.0.0``), a new minor version of the current major version (``X.Y.0``), or a new patch of the current major-minor version (``X.Y.Z``). Release tags are semantic version identifiers following the `pep 440 <https://peps.python.org/pep-0440/>` specification. | ||
|
||
1. Create a Release | ||
|
||
On GitHub.com, navigate to the main page of the repository. To the right of the list of files, click **Releases**. At the top of the page, click **Draft a new release**. Type a tag using semantic versioning described in the previous section. The Target should be the main branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emphasize that the tag is without the "v"?
@@ -86,9 +80,19 @@ At the HEAD of the ``main`` branch, create and push a tag with the semantic vers | |||
|
|||
.. code-block:: sh | |||
|
|||
git tag -s vX.Y.Z -m "vX.Y.Z" | |||
git tag -s X.Y.Z -m "X.Y.Z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for removing the "v", but I still say this step is unnecessary. (And, in the unlikely event that the HEAD of main
moved since you created the release, you'd be altering the definition of an existing tag.)
7cf4a08
to
2f9e726
Compare
doc/playbook.rst
Outdated
|
||
Select **Generate Release Notes**. This will generate a list of commit summaries and of submitters. Add text as follows. | ||
* Add the specific motivation for the release(for example, including a specific feature, preparing for a specific observing run)) | ||
* Any specific motivation for the release(for example, including a specific feature, preparing for a specific observing run)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Any specific motivation for the release(for example, including a specific feature, preparing for a specific observing run)) | |
* Any specific motivation for the release (for example, including a specific feature, preparing for a specific observing run)) |
3fa0772
to
6897594
Compare
…tests or labels added. Testing initial functionality.
…ons. The Release Management updates include fixes to GitHub Action syntax on the and playbook documentation. The Build Base Dockerfile was moved to a base directory and GitHub action updated. The Release Management GitHub action is using a composite GitHub action that does not support specifying a Dockerfile file name. The Build Service Dockerfile was updated to remove the .activator suffix to accomodate and the Build Service GitHub action updated.
…dated text for what to include in release management summary.
6897594
to
8a68c17
Compare
Add GitHub Action to build releases. Playbook is updated to include release management instructions. This also moves the base Dockerfile into the base directory and changes naming of activator Dockerfile. Both the build base and build GitHub actions are updated accordingly.