-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[ci] updates update-release-info to support batch release
#10958
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: main
Are you sure you want to change the base?
Conversation
| await for (final PackageEnumerationEntry entry in getPackagesToProcess()) { | ||
| if ((entry.package.parseCIConfig()?.isBatchRelease ?? false) && | ||
| (entry.package.parsePubspec().version?.isPreRelease ?? false)) { | ||
| throw UsageException( |
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.
note to myself, will need to add checks in #10859 to enforce 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.
Code Review
This pull request modifies the update-release-info command to support batch releases. For packages configured for batch release, the command now creates a pending changelog YAML file in a pending_changelogs directory instead of directly updating the pubspec.yaml and CHANGELOG.md files. The implementation separates the logic for direct updates and batch release updates into distinct methods. A check has been added to prevent running the command on batch release packages with pre-release versions. New tests have been added to verify the batch release functionality. I have one suggestion to improve code readability.
update-release-info to support batch release
| type = VersionChange.patch; | ||
| case _VersionIncrementType.build: | ||
| throw UnimplementedError( | ||
| 'Build version changes should not happen in batch mode. Please file an issue if you see 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.
It's not clear to me what this instruction means. If it's not supposed to happen, why should the person file an issue? What would that issue say/request?
If you mean that it's not supported, then it should say that it's not currently supported and that if that's an issue they should file an issue requesting support for build versions in batch changes.
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.
It can't logically happen because otherwise the tool should have throw UsageError in the earlier stage. If this line is reached, that mean something is wrong with the code
4afcd4c to
892b9cc
Compare
stuartmorgan-g
left a comment
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.
LGTM
a44d965 to
e3d2c70
Compare
|
autosubmit label was removed for flutter/packages/10958, because - The status or check suite Mac_arm64 ios_platform_tests_shard_3 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
As title
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3