Skip to content

Commit 9b864c4

Browse files
docs(maintainers): improve release process documentation (#7088)
* Updating release documentation * Updating release documentation * Addressing Andrea's feedback * Addressing Andrea's feedback
1 parent 23f2b5f commit 9b864c4

File tree

1 file changed

+45
-7
lines changed

1 file changed

+45
-7
lines changed

docs/maintainers.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,37 @@ Some examples using our initial and new RFC templates: #92, #94, #95, #991, #122
151151

152152
### Releasing a new version
153153

154-
Firstly, make sure the commit history in the `develop` branch **(1)** it's up to date, **(2)** commit messages are semantic, and **(3)** commit messages have their respective area, for example `feat(logger): <change>`, `chore(ci): ...`).
154+
!!! note "Only maintainers with write access to this repository can release a new version"
155155

156-
**Looks good, what's next?**
156+
Releasing a new version is a multi-step process that takes up to 2 hours to complete. Most steps are automated - you provide inputs to trigger the release and monitor progress.
157157

158-
Kickoff the [`Release` workflow](https://github.com/aws-powertools/powertools-lambda-python/blob/6db9079d21698b72f5d36d72c993c1aad7276db6/.github/workflows/release.yml#L3) with the intended version - this might take around 25m-30m to complete.
158+
**Prerequisites**: Ensure the commit history in the `develop` branch is up to date, commit messages are semantic, and include their respective area (e.g., `feat(logger): <change>`, `chore(ci): ...`).
159159

160-
Once complete, you can start drafting the release notes to let customers know **what changed and what's in it for them (a.k.a why they should care)**. We have guidelines in the [release notes section](#drafting-release-notes) so you know what good looks like.
160+
<!-- markdownlint-disable MD013 -->
161+
**Release Steps**:
162+
163+
1. **Run [end-to-end tests](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/run-e2e-tests.yml)** and ensure they pass
164+
2. **Trigger Release v3 workflow** - Run the [`Release v3`](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/release-v3.yml) workflow with two inputs: the new Powertools version (check [latest version](https://pypi.org/project/aws-lambda-powertools/)) and the new Lambda Layer version number. To find the new Lambda Layer version number, go to this [page](https://docs.powertools.aws.dev/lambda/python/latest/#python-313) and increase the version by one (N + 1).
165+
3. **Monitor the release workflow** - it runs tests, publishes to PyPI, deploys Lambda layers to Beta and Prod environments across all commercial regions, runs canary tests, and updates documentation. If it fails, see the [Re-run partial failed Release workflow](#re-run-partial-failed-release-workflow) section
166+
4. **Review and merge documentation/version PRs** - two PRs will be created to update documentation and bump version files. Review, approve and merge both (order doesn't matter)
167+
5. **Deploy GovCloud layers** - Run the [`Layer Deployment (GovCloud)`](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/layer_govcloud.yml) workflow with `develop` branch, `Prod` environment, and the Layer version number from step 2.
168+
6. **Deploy China layers** - Run the [`Layer Deployment (Partitions)`](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/layers_partitions.yml) workflow with `develop` branch, `Prod` environment, and the Layer version number from step 2.
169+
7. **Update documentation** - Run the [`Rebuild latest docs`](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/rebuild_latest_docs.yml) workflow with `develop` branch and the PyPI package version
170+
171+
Once complete, you can start drafting the release notes to let customers know **what changed and what's in it for them (a.k.a why they should care)**. We have guidelines in the [release notes](#drafting-release-notes) section so you know what good looks like.
172+
173+
#### Re-run partial failed Release workflow
174+
175+
While workflows are designed to be stable, failures can occur during the release process. If the release workflow fails, you have two recovery options:
176+
177+
**Option 1: Re-run failed jobs** The Release v3 pipeline contains several steps, and one of them is `publish_layer`. This step is responsible for building and deploying public Lambda layers. If this step fails due to CloudFormation errors (we deploy approximately 600 layers per release and cannot control CloudFormation quotas), you can re-run only the failed jobs. This will retry the deployment and typically resolves quota-related issues.
178+
<!-- markdownlint-enable MD013 -->
161179

162-
> **NOTE**: Documentation might take a few minutes to reflect the latest version due to caching and CDN invalidations.
180+
**Option 2: Re-trigger the entire workflow**
181+
If the release fails due to workflow modifications or permission issues that prevent re-running failed jobs, trigger the Release v3 workflow again.
182+
183+
!!! important "Avoid PyPI errors"
184+
Make sure to select `Skip publishing to PyPI` as it can't publish more than once. This is useful for semi-failed releases when rerunning the entire workflow to avoid duplicate publishes
163185

164186
#### Release process visualized
165187

@@ -222,12 +244,28 @@ section Docs
222244
Create PR (Layer ARN) : active, after layer_prod, 8s
223245
Release versioned docs : active, 2.2m
224246
225-
Documentation release : milestone, m4, 10:28,1m
247+
Documentation release : milestone, m5, 10:28,1m
248+
249+
section SSM Parameters
250+
Update SSM Parameters : active, 8s
251+
252+
SSM Parameters : milestone, m6, 10:28,1m
226253
227254
section Post-release
228255
Close pending issues : active, 8s
229256
230-
Release complete : milestone, m6, 10:31,2m
257+
section GovCloud
258+
Publish GovCloud layers (Gamma) : active, 8s
259+
Publish GovCloud layers (Prod) : active, 8s
260+
GovCloud layers published : milestone, m7
261+
262+
263+
section China
264+
Publish China layers (Gamma) : active, 8s
265+
Publish China layers (Prod) : active, 8s
266+
China layers published : milestone, m8
267+
268+
Release complete : milestone, m9, 10:31,2m
231269
```
232270

233271
#### Drafting release notes

0 commit comments

Comments
 (0)