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
ci: add deprecate release workflow #2532
Conversation
scripts/components/git_client.ts
Outdated
*/ | ||
getTagsAtCommit = async (commitHash: string) => { | ||
// filter out packages not published to npm | ||
const privatePackages = [ |
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.
Not a blocker, but how can we keep this list in sync? How do we remember in the future to edit this list if we add a private package?
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 created a postinstall
command to generate the list of private packages so now it should always be in sync.
* Note that this does not mean just looking up the previous release tags. | ||
* It may be the case that package-A was released in release-5 but the previous release of package-A happened in release-2. | ||
* This method will walk through past release tags until it finds the previous version of all of the input package versions | ||
* If a previous version of some package cannot be found, an error is thrown. |
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.
DOes this mean that we are unable to roll back releases that contain the first public publication of a package?
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.
Yes, I'll see if there is a way to resolve this.
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 changed this to just print a warning message when a previous release is not found.
Description of changes
Usage
Example:
This will deprecate all packages that were bumped in 143a266. If the deprecated version is also the latest, the workflow will also set the latest tag for all of these packages to the previous version.
CDK / CloudFormation Parameters Changed
N/A
Issue #, if available
N/A
Description of how you validated changes
I ran the workflow against the CodeBuild project in my personal account. I only tested against the verdaccio local registry so the production deprecation is not fully tested.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.