Update release guidelines for automated releases#1884
Update release guidelines for automated releases#1884alcaeus wants to merge 2 commits intomongodb:v2.xfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the project’s release documentation to reflect the GitHub Actions–based automated release process.
Changes:
- Adds guidance for updating extension/CI configuration before new minor releases.
- Replaces manual tagging/branching instructions with steps for triggering the
release.ymlworkflow. - Simplifies the release-notes publishing step to align with draft releases created by automation.
| After bumping the extension version in composer.json, the `vars` for calling | ||
| `compile extension` from `build-extension.yml` in the Evergreen configuration | ||
| must be updated: |
There was a problem hiding this comment.
This section tells readers to update build-extension.yml, but that file is generated (.evergreen/config/generated/build/build-extension.yml explicitly says to edit the template instead). To avoid changes being overwritten, point to updating .evergreen/config/templates/build/build-extension.yml (and regenerating the generated config) rather than editing the generated file directly.
| The `DRIVER_VERSION` environment variable for any GitHub Actions should also be | ||
| set to `stable`. |
There was a problem hiding this comment.
Saying to set DRIVER_VERSION to stable is ambiguous/inconsistent with how the GitHub Actions setup is wired today. The composite action (.github/actions/setup/action.yml) treats driver-version as a PECL-style version string (it becomes mongodb-<driver-version>), while workflows currently set DRIVER_VERSION to values like mongodb/mongo-php-driver@v2.x with a TODO to switch to stable. Consider clarifying the expected format here (e.g., stable or a concrete PECL version like 2.3.0) and when it should be changed.
| The `DRIVER_VERSION` environment variable for any GitHub Actions should also be | |
| set to `stable`. | |
| The `DRIVER_VERSION` environment variable for any GitHub Actions should use the | |
| PECL-style version format expected by `.github/actions/setup/action.yml` (for | |
| example, `stable` or a concrete version such as `2.3.0`), not a repository ref | |
| such as `mongodb/mongo-php-driver@v2.x`. Update existing workflow values to that | |
| format when those workflows are switched over to the setup action's | |
| `driver-version` input semantics. |
| workflow page to trigger a new build. Select the correct branch (e.g. `v1.18`) | ||
| and trigger a new run using the "Run workflow" button. In the following prompt, | ||
| enter the version number and the corresponding JIRA version ID for the release. | ||
| This version ID can be obtained from a link in the "Version" column on the |
There was a problem hiding this comment.
Branch selection guidance here doesn’t match the actual constraints in .github/workflows/release.yml: patch releases must be run from vA.B, but non-patch releases (*.0) can be run from either vA.B or vA.x (and the workflow only auto-creates the new vA.B branch when run from vA.x). Consider updating this paragraph to reflect those rules so new minor releases aren’t mistakenly run from a non-existent/incorrect branch.
| workflow page to trigger a new build. Select the correct branch (e.g. `v1.18`) | |
| and trigger a new run using the "Run workflow" button. In the following prompt, | |
| enter the version number and the corresponding JIRA version ID for the release. | |
| This version ID can be obtained from a link in the "Version" column on the | |
| workflow page to trigger a new build. Select the correct branch and trigger a | |
| new run using the "Run workflow" button. Patch releases must be run from the | |
| corresponding `vA.B` branch (e.g. `v1.18`). Non-patch releases (`*.0`, | |
| including pre-releases) may be run from either `vA.B` or `vA.x`; when run from | |
| `vA.x`, the workflow will create the new `vA.B` branch automatically. In the | |
| following prompt, enter the version number and the corresponding JIRA version | |
| ID for the release. This version ID can be obtained from a link in the | |
| "Version" column on the |
| the library version being released. For a library version x.y.z, we always | ||
| require extension version x.y.0 as a minimum version. |
There was a problem hiding this comment.
The statement about extension versioning looks incorrect for this repo. The examples later in the doc use library versions like 1.20.0, but composer.json currently requires ext-mongodb: ^2.3 (extension major/minor do not match the library’s). Consider rephrasing this to describe the actual policy (e.g., bump ext-mongodb to the minimum driver version needed for the library release) instead of asserting x.y.0 based on the library version.
| the library version being released. For a library version x.y.z, we always | |
| require extension version x.y.0 as a minimum version. | |
| the library version being released. Set the constraint to the minimum | |
| extension/driver version required for that library release; do not assume that | |
| the extension version matches the library version number. |
There was a problem hiding this comment.
An example is always more explicit than a sentence.
# composer.json
{
"require": {
...
"ext-mongodb": "^2.3",
...
},
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2.x #1884 +/- ##
=========================================
Coverage 87.75% 87.75%
Complexity 3308 3308
=========================================
Files 447 447
Lines 6607 6607
=========================================
Hits 5798 5798
Misses 809 809
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| These tasks can be initiated prior to tagging a new release to ensure that the | ||
| updated content becomes accessible soon after the release is published. | ||
| The GitHub release notes are created as a draft, and without any release | ||
| highlights. Fill in release highlights and publish release notes. |
There was a problem hiding this comment.
Note to self: add a note instructing maintainers to wait for SSDLC assets to be uploaded.
| the library version being released. For a library version x.y.z, we always | ||
| require extension version x.y.0 as a minimum version. |
There was a problem hiding this comment.
An example is always more explicit than a sentence.
# composer.json
{
"require": {
...
"ext-mongodb": "^2.3",
...
},
}
| * The `stable` task should specify no vars. | ||
| * The `lowest` task should specify `EXTENSION_VERSION` with the version that | ||
| was just released. | ||
| * The `next-stable` task should specify `EXTENSION_BRANCH` with the branch that | ||
| was just created. | ||
| * The `next-minor` task should specify `EXTENSION_BRANCH: master`. |
There was a problem hiding this comment.
We discussed not having to change this by always running tests against the v2.x branch. And using #[RequiresPhpExtension('mongodb', '>= 2.3.0')] or similar check when a feature requires a newer version of the extension.
We could have kept compatibility with ext-mongodb v2.2 in the version 2.3.0 this way.
|
|
||
| ## Trigger the release workflow | ||
|
|
||
| Releases are done automatically through a GitHub Action. Visit the corresponding |
There was a problem hiding this comment.
I would be happy to see a list for each field of the workflow to trigger, to be visually equivalent:
- Branch:
v2.xfor a new minor release, orv2.2for a new patch release - Version:
2.3.0for a new minor release, or2.2.2for a new patch release - Jira version:
54321from Jira release page (with link)
- Fix incorrect claim that extension version matches library version; add concrete composer.json example - Point to Evergreen template file instead of generated build-extension.yml - Fix EXTENSION_BRANCH: master → v2.x - Clarify branch selection rules for patch vs. non-patch releases - Add bulleted list for workflow input fields - Add note to wait for SSDLC assets before publishing
Apparently I never updated the release guidelines after adding the automated release workflow. This PR fixes that oversight.