Skip to content
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

Allow multiple releases per day in the smithy-rs repository #3875

Merged
merged 13 commits into from
Oct 18, 2024

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented Oct 11, 2024

Motivation and Context

Currently, we can only make one smithy-rs release per day, and this restricts our ability to respond to urgent issues. This PR lifts that limitation, allowing us to make multiple releases per day.

Description

The core of this change is in the render subcommand of changelogger. When generating a date-based release tag, it now checks for existing tags on the same day. If a tag already exists, the render subcommand will append a numerical suffix to ensure the new tag is unique.

In fact, appending a numerical suffix to make a release tag unique has been a workaround in our release pipeline (outside the smithy-rs repository) for quite some time. With the changes in this PR, we can eliminate that temporary solution from the release pipeline.

Now that changelogger requires access to previous tags, CI steps that run generate-smithy-rs-release need to checkout the smithy-rs repository with all tags (fetch-depth: 0 is for that purpose).

Testing

  • Added unit tests for changelogger
  • Successfully bumped the release tag in dry-run (based on this dummy change to trick changelogger into thinking that it has to bump a release tag)
  • Successfully bumped the release tag in the release pipeline (without the temporary hack we placed last year)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@@ -202,7 +208,7 @@ jobs:
# to retry a release action execution that failed due to a transient issue.
# In that case, we expect the commit to be releasable as-is, i.e. the changelog should have already
# been processed.
git fetch --unshallow
git fetch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, specifying --unshallow in a repository with fetch-depth: 0 will fail with the following error:

fatal: --unshallow on a complete repository does not make sense

@ysaito1001 ysaito1001 requested a review from aajtodd October 16, 2024 00:16
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 marked this pull request as ready for review October 16, 2024 01:37
@ysaito1001 ysaito1001 requested review from a team as code owners October 16, 2024 01:37
Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, two questions around if some validations are possible and one about improving an error message

tools/ci-build/changelogger/src/render.rs Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
@ysaito1001 ysaito1001 added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit de4bc45 Oct 18, 2024
44 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/multiple-releases-a-day branch October 18, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants