-
Notifications
You must be signed in to change notification settings - Fork 136
[Tooling] Use ReleasesV2 version as the source of truth during Code Freeze #14871
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
base: trunk
Are you sure you want to change the base?
Conversation
b81c8fb to
8e7ef55
Compare
|
I'm not sure I understand why this is a good idea. I can imagine edge cases where it would be totally legit for the version provided by ReleasesV2 is not matching the "next version" computed from the
All in all I'm thus not convinced that this change of making this an error is the right move. I'd even suggest that ReleasesV2 should always be considered the only source of truth and that we maybe don't even bother checking if the "next version based on |
This came mainly from a quick discussion we had at the meetup following up to this issue. Of course didn't discuss it very deeply, but I recall us coming to the conclusion that an error would've avoided this case and we should probably switch to an error, as in this set of PRs. This issue admittedly is also an edge case... but there are many others, as just simply retrying code freeze multiple times -- without guardrails, as is this lane probably will always be a point for issues and require manual intervention. Though I fully get the cases you pointed. I think we're maybe missing something that will take us to some balance between a very strict validation that will potentially block folks and letting the lane to be freely ran and just deal with the relatively frequent consequences. Maybe a proper fix would require changes in the UI, like flag like "Force Rv2 Version". Or just use the Rv2 version directly without the check, as you also mentioned.
This is something I've also been thinking while I was adding the validation. Given the current code, the changes for this to fully work are a bit more subtle. There are a lot of version calculations (beta, next milestone release, etc), utils that use the files, each repo is a bit different.... Maybe receiving the version from Rv2 and setting it in the |
What about just validating that the ReleasesV2 version is not already set in the
Yep, that's what I was gonna suggest next. The important part for which ReleasesV2 has to be the one dictating the version is when we do the code freeze, since that's the only moment during which we update the version to a new value and thus where we want ReleasesV2 to be the source of truth for what that new version should be, and thus which version to bump the For all other lanes after the
|
…of just showing a warning
8e7ef55 to
42cee9e
Compare
…hroughout code freeze
64c05f2 to
4af8a15
Compare
|
@AliSoftware I've updated this PR (as well as a couple of others with the PR title and description, the rest will follow) following a simpler approach of just taking the version from ReleasesV2. I've tweaked the beta version used throughout the lane and a couple of minor things, but I think it looks better now. |
See AINFRA-1478
Description
This PR enhances the version handling added in the previous iteration to assume the version received by the code freeze lane as the source of truth, ignoring potential mismatches between the ReleasesV2 version and the project's computed version.
Testing
You can make sure the calculated release branch, current version and the next version are correctly shown in the "Continue" prompt, rememberomg to answer
Nwhen asked to continue to cancel the code freeze.To avoid unexpected results, comment out the lines doing
ensure_git_status_cleanandFastlane::Helper::GitHelper.checkout_and_pull(DEFAULT_BRANCH)at the beginning of the lane.You can run the
start_code_freezelane, with and without the version parameters:bundle exec fastlane start_code_freezebundle exec fastlane start_code_freeze version:30.6This will be fully tested in the next release cycle during code freeze.