-
Notifications
You must be signed in to change notification settings - Fork 146
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
Maintenance: publish layers & increment version during main release process #1124
Comments
Chat with @rubenfonseca as he's just finished integrating our release with Layer version bump in the docs + ARM64 too, since we're now making ~168 Layer deployments per release |
Need to check what has been done on python side (aws-powertools/powertools-lambda-python#1610) but thinking of this , the script could use https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#listLayerVersions-property API in the github action to bump based on true version published |
This comment was marked as outdated.
This comment was marked as outdated.
Seems that one of the workflows introduced in the PR that closed this issue has a circular dependency: https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/4271035677 |
|
Bug description
At the moment the release process for the utilities and layers loosely works as follows:
Looking at the diagram above we can observe that the Layer publishing workflow and the release one diverge from the publishing one. This is a problem because the following happens:
v.1.3.0
)This means that by the time we make the GitHub release and release the docs, the tag that was created at step 1 is outdated and that the commit that updates the Layer version in the docs won't be taken in account.
This is what happened in the last release (v1.3.0) which should correspond to Layer version 3 but instead shows version 2 (from before the process above) that corresponds to
v1.2.1
of the library.Expected Behavior
The tag that is used to release a version & publish docs should already include the commit that updates the Layer version in the docs.
Current Behavior
Layer version in the docs is not synced with latest & with release version.
Possible Solution
There are three options that I could think of.
Option 1
Publish workflow optimistically increments by one the Layer version in the docs at some point BEFORE versioning.
In this scenario the layers are published at the same step as now, but the Make Release workflow optimistically bumps the layer version in the docs before making the release. This way the commit that increments the layer version in the docs will have been made before the tag is pushed.
This option is the simpler to implement and hinges on the fact that Layers are always and exclusively published as part of a full release train.
Option 2
Layers + docs update are published AFTER versioning has happened BUT BEFORE the tags is pushed.
In this scenario, the Publish Layers action is triggered as intermediate step between
npm run version
&npm run publish
(here). This way the layer publishing processThis option will require us to run the commands currently run in the
postversion
command in eachpackage.json
file (git push && git push --tags
) after the docs have already been updated with the new Layers version.This will work as long as the Publish Layers workflow is able to use the same context as the Make Release one & be able to see the that the version in the
package.json
files has been bumped.Option 3
Leave all workflow as they are and manually update the version in the docs BEFORE starting the release process.
This step requires no changes in the pipelines but revolves around us maintainers following the process & making no errors.
If we are to follow this, we'll have to document the release SOP and make sure it's followed.
Steps to Reproduce
See above.
Environment
Related issues, RFCs
#826
The text was updated successfully, but these errors were encountered: