From b37ec0ea27e1d70aafc4ae5e3aaf288f51ce9666 Mon Sep 17 00:00:00 2001 From: Orion Eiger Date: Fri, 6 Dec 2024 14:57:13 -0800 Subject: [PATCH 1/3] Add directions to playbook for Science Pipelines quick-builds --- doc/playbook.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/playbook.rst b/doc/playbook.rst index 5fc82483..fdc352f5 100644 --- a/doc/playbook.rst +++ b/doc/playbook.rst @@ -67,6 +67,36 @@ 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``. +In case your intended Base Container is not a tagged Science Pipelines Release: Building the Science Pipelines Manually +----------------------------------------------------------------------------------------------------------------------- +It will sometimes be necessary to compile a container with the LSST Science Pipelines manually. Generally, this only occurs if the intended daily or weekly stack does not compile. In these cases, the Science Pipelines themselves must be built ahead of the base container. Here are instructions for building the Science Pipelines. + +#. Check the `Science Pipelines changelog `_ to make sure only the intended changes are on ``main``. + + If ``main`` contains only changes that are intended for the Science Pipelines build, proceed and build the main branch! Otherwise, a cherry-pick or backport branch should be built. + +#. Go to the `GitHub Actions build system for the Science Pipelines. `_ + +#. Select "**Run Workflow**."" In the drop-down menu, fill in the following details: + + #. **Use workflow from** + + In almost all cases, you'll want the ``main`` branch. Generally speaking, this is the branch of the Science Pipelines that you're trying to build. If there is a specific branch for a cherry-pick or backport, you'll want that branch instead. + + #. **List of products to build** + + Insert products to build, just like for Jenkins, but the default is what the standard containers have (except ``pipelines_check``). + + #. **Version of rubin-env conda environment** + + Make sure this matches the version for the current LSST Science Pipelines! At time of writing, the GitHub Actions page suggests version ``8.0.0`` and this needed to be set to version ``9.0.0`` + + #. **Container tag** + + Select a tag for the container that reflects its contents (e.g. ``d_2024_06_21_DM-44996`` or ``or4_pp_20240625``). The rubin-env version will be appended. + + Click "**Run Workflow**". The resulting container, if things succeed, will be available at ``ghcr.io/lsst/quick-stack:{your tag here}-{rubin-env version}``. + Release Management ================== From b3e5bcd12cbd5311aed14f452dea9ee3cff66677 Mon Sep 17 00:00:00 2001 From: Orion Eiger Date: Fri, 6 Dec 2024 15:37:56 -0800 Subject: [PATCH 2/3] Fix numbering for Release Management playbook section --- doc/playbook.rst | 94 ++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/doc/playbook.rst b/doc/playbook.rst index fdc352f5..064b333e 100644 --- a/doc/playbook.rst +++ b/doc/playbook.rst @@ -108,76 +108,76 @@ From the ``main`` branch you can release a new major version (``X.0.0``), a new Release tags are semantic version identifiers following the `pep 440 `_ specification. Please note that the tag does not include a ``v`` at the beginning. -1. Choose Version Number +#. Choosing the Version Number -On GitHub.com, navigate to the main page of the repository. -To the right of the list of files, click the latest release. -At the top of the page, click **## commits to main since this release**. -(If there's no such link or it doesn't mention ``main``, the release is probably based off a branch; go up to Releases and try older versions until you find one.) -This is the list of internal changes that will be included in the next release. + On GitHub.com, navigate to the main page of the repository. + To the right of the list of files, click the latest release. + At the top of the page, click **## commits to main since this release**. + (If there's no such link or it doesn't mention ``main``, the release is probably based off a branch; go up to Releases and try older versions until you find one.) + This is the list of internal changes that will be included in the next release. -If you are planning to update the Science Pipelines tag, you should also check the `Science Pipelines changelog `_. -In practice, almost any Science Pipelines update is at least a minor version, because new features are added constantly. -In the future, there may be "patched weekly" builds, which would justify a patch version of Prompt Processing. + If you are planning to update the Science Pipelines tag, you should also check the `Science Pipelines changelog `_. + In practice, almost any Science Pipelines update is at least a minor version, because new features are added constantly. + In the future, there may be "patched weekly" builds, which would justify a patch version of Prompt Processing. -For the ``prompt_processing`` service, a new major version is triggered by any of the following: + For the ``prompt_processing`` service, a new major version is triggered by any of the following: -* Incompatibility with old fanned-out ``nextVisit`` messages (almost any change to ``Visit`` qualifies) -* Incompatibility with an old `APDB schema`_, `ApdbSql`_, or `ApdbCassandra`_ version (see `DMTN-269`_ for the distinction) -* Incompatibility with an old `Butler dimensions-config`_ version -* A new major version of the `Alerts schema`_ (see `DMTN-093`_ for details) + * Incompatibility with old fanned-out ``nextVisit`` messages (almost any change to ``Visit`` qualifies) + * Incompatibility with an old `APDB schema`_, `ApdbSql`_, or `ApdbCassandra`_ version (see `DMTN-269`_ for the distinction) + * Incompatibility with an old `Butler dimensions-config`_ version + * A new major version of the `Alerts schema`_ (see `DMTN-093`_ for details) -For the `next_visit_fan_out`_ service, a new major version is triggered by any of the following: + For the `next_visit_fan_out`_ service, a new major version is triggered by any of the following: -* Incompatibility with old Summit ``nextVisit`` messages -* Breaking changes in the fanned-out ``nextVisit`` messages (almost any change to ``NextVisitModel`` qualifies) + * Incompatibility with old Summit ``nextVisit`` messages + * Breaking changes in the fanned-out ``nextVisit`` messages (almost any change to ``NextVisitModel`` qualifies) -2. Create a Release +#. 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. + 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. -Select **Generate Release Notes**. -This will generate a list of commit summaries and of submitters. -Add text as follows. + Select **Generate Release Notes**. + This will generate a list of commit summaries and of submitters. + Add text as follows. -* Any specific motivation for the release (for example, including a specific feature, preparing for a specific observing run) -* Science Pipelines version and rubin-env version -* Supported `APDB schema`_ and `ApdbSql`_/`ApdbCassandra`_ versions (see `DMTN-269`_ for rationale). - You do *not* need to consider the `ApdbCassandraReplica` version. - A stack quoting a given minor version is compatible with *older* APDBs of that major version but not necessarily newer ones; for example, a release whose baseline is APDB schema 1.4.0 can access a schema 1.0.0 or 1.4.1 database, but not schema 1.5. -* Supported `Butler dimensions-config`_ versions -* The `Alerts schema`_ version used for output (see `DMTN-093`_ for details) + * Any specific motivation for the release (for example, including a specific feature, preparing for a specific observing run) + * Science Pipelines version and rubin-env version + * Supported `APDB schema`_ and `ApdbSql`_/`ApdbCassandra`_ versions (see `DMTN-269`_ for rationale). + You do *not* need to consider the `ApdbCassandraReplica` version. + A stack quoting a given minor version is compatible with *older* APDBs of that major version but not necessarily newer ones; for example, a release whose baseline is APDB schema 1.4.0 can access a schema 1.0.0 or 1.4.1 database, but not schema 1.5. + * Supported `Butler dimensions-config`_ versions + * The `Alerts schema`_ version used for output (see `DMTN-093`_ for details) -.. _DMTN-093: https://dmtn-093.lsst.io/#alertmanagement + .. _DMTN-093: https://dmtn-093.lsst.io/#alertmanagement -.. _DMTN-269: https://dmtn-269.lsst.io/ + .. _DMTN-269: https://dmtn-269.lsst.io/ -.. _Butler dimensions-config: https://pipelines.lsst.io/v/daily/modules/lsst.daf.butler/dimensions.html#dimension-universe-change-history + .. _Butler dimensions-config: https://pipelines.lsst.io/v/daily/modules/lsst.daf.butler/dimensions.html#dimension-universe-change-history -.. _APDB schema: https://github.com/lsst/sdm_schemas/blob/main/python/lsst/sdm_schemas/schemas/apdb.yaml#L4 + .. _APDB schema: https://github.com/lsst/sdm_schemas/blob/main/python/lsst/sdm_schemas/schemas/apdb.yaml#L4 -.. _ApdbSql: https://github.com/lsst/dax_apdb/blob/main/python/lsst/dax/apdb/sql/apdbSql.py#L72-L76 + .. _ApdbSql: https://github.com/lsst/dax_apdb/blob/main/python/lsst/dax/apdb/sql/apdbSql.py#L72-L76 -.. _ApdbCassandra: https://github.com/lsst/dax_apdb/blob/main/python/lsst/dax/apdb/cassandra/apdbCassandra.py#L85-L89 + .. _ApdbCassandra: https://github.com/lsst/dax_apdb/blob/main/python/lsst/dax/apdb/cassandra/apdbCassandra.py#L85-L89 -.. _Alerts schema: https://github.com/lsst/alert_packet/blob/main/python/lsst/alert/packet/schema/latest.txt + .. _Alerts schema: https://github.com/lsst/alert_packet/blob/main/python/lsst/alert/packet/schema/latest.txt -Select **Publish Release**. + Select **Publish Release**. -The `ci-release.yaml `_ GitHub Actions workflow uploads the new release to GitHub packages. + The `ci-release.yaml `_ GitHub Actions workflow uploads the new release to GitHub packages. -3. Tag the release +#. Tag the release -At the HEAD of the ``main`` branch, create and push a tag with the semantic version: + At the HEAD of the ``main`` branch, create and push a tag with the semantic version: -.. code-block:: sh + .. code-block:: sh - git tag -s X.Y.Z -m "X.Y.Z" - git push --tags + git tag -s X.Y.Z -m "X.Y.Z" + git push --tags Patch Releases and Release Branches ----------------------------------- From 62e1136ab88cf36cf976e1d95ab807935c8867ff Mon Sep 17 00:00:00 2001 From: Orion Eiger Date: Fri, 6 Dec 2024 16:01:09 -0800 Subject: [PATCH 3/3] Small edits to playbook formatting, for clarity --- doc/playbook.rst | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/doc/playbook.rst b/doc/playbook.rst index 064b333e..3c6a94e4 100644 --- a/doc/playbook.rst +++ b/doc/playbook.rst @@ -21,16 +21,18 @@ Containers ========== The service consists of two containers. -The first is a base container with the Science Pipelines "stack" code and networking utilities. -The second is a service container made from the base that has the Prompt Processing service code. +The first is a **base container** with the Science Pipelines "stack" code and networking utilities. +The second is a **service container** made from the base that has the Prompt Processing service code. All containers are managed by `GitHub Container Registry `_ and are built using GitHub Actions. To build the base container: * If there are changes to the container, push them to a branch, then open a PR. - The container should be built automatically. -* If there are no changes (typically because you want to use an updated Science Pipelines container), go to the repository's `Actions tab `_ and select "Run workflow". - From the dropdown, select the branch whose container definition will be used, and the label of the Science Pipelines container. + This will build the container automatically. +* If there are no changes (typically because you want to use an updated Science Pipelines container), go to the repository's `Actions tab `_ and select "**Run workflow**". From the dropdown menu, select: + + #. The branch whose container definition will be used + #. The label of the Science Pipelines container. * New containers built from ``main`` are tagged with the corresponding Science Pipelines release (plus ``w_latest`` or ``d_latest`` if the release was requested by that name). For automatic ``main`` builds, or if the corresponding box in the manual build is checked, the new container also has the ``latest`` label. Containers built from a branch use the same scheme, but prefixed by the ticket number or, for user branches, the branch topic. @@ -44,14 +46,16 @@ To build the base container: To build the service container: * If there are changes to the service, push them to a branch, then open a PR. - The container should be built automatically using the ``latest`` base container. -* To force a rebuild manually, go to the repository's `Actions tab `_ and select "Run workflow". + This will build the container automatically using the ``latest`` base container. +* To force a rebuild manually, go to the repository's `Actions tab `_ and select "**Run workflow**". From the dropdown, select the branch whose code should be built. - The container will be built using the ``latest`` base container, even if there is a branch build of the base. -* To use a base other than ``latest``, edit ``.github/workflows/build-service.yml`` on the branch and override the ``BASE_TAG_LIST`` variable. - Be careful not to merge the temporary override to ``main``! + By default, the container is built using the ``latest`` base container, even if there is a branch build of the base. + + * If this is the desired base container, no action is necessary. + * To use a base other than ``latest``, edit ``.github/workflows/build-service.yml`` on the branch and override the ``BASE_TAG_LIST`` variable. + Be careful not to merge the temporary override to ``main``! * New service containers built from ``main`` have the tags of their base container. - Containers built from a branch are prefixed by the ticket number or, for user branches, the branch topic. + Containers built from a branch should be prefixed by the ticket number or, for user branches, the branch topic. .. note:: @@ -110,6 +114,10 @@ Please note that the tag does not include a ``v`` at the beginning. #. Choosing the Version Number + The first step in making a release is choosing an appropriate version number to describe it. This subsection offers guidance on this choice, as well as on differentiating between major and minor releases. + + **To see which changes have occurred since the last release:** + On GitHub.com, navigate to the main page of the repository. To the right of the list of files, click the latest release. At the top of the page, click **## commits to main since this release**. @@ -120,6 +128,8 @@ Please note that the tag does not include a ``v`` at the beginning. In practice, almost any Science Pipelines update is at least a minor version, because new features are added constantly. In the future, there may be "patched weekly" builds, which would justify a patch version of Prompt Processing. + **Guidance on designating major releases:** + For the ``prompt_processing`` service, a new major version is triggered by any of the following: * Incompatibility with old fanned-out ``nextVisit`` messages (almost any change to ``Visit`` qualifies) @@ -142,7 +152,7 @@ Please note that the tag does not include a ``v`` at the beginning. Select **Generate Release Notes**. This will generate a list of commit summaries and of submitters. - Add text as follows. + Add text as follows: * Any specific motivation for the release (for example, including a specific feature, preparing for a specific observing run) * Science Pipelines version and rubin-env version