Skip to content

[tool] Apply diff-based exemptions in update-release-info minimal mode - #13782

Open
jmagman wants to merge 2 commits into
flutter:mainfrom
jmagman:tool-update-release-info-git-exemptions
Open

jmagman wants to merge 2 commits into
flutter:mainfrom
jmagman:tool-update-release-info-git-exemptions

Conversation

@jmagman

@jmagman jmagman commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

update-release-info --version=minimal and the version/changelog validator both use checkPackageChangeState, but only the validator passes a GitVersionFinder, which is what enables the exemptions that inspect diff contents (for example test-only Gradle dependency bumps). So minimal bumped versions for changes that repo_checks accepts as-is.
Pass the finder using the already-computed base SHA. Make git required so this doesn't happen in any other spots.

The new test fails without the command change and passes with it.

Blocking a nice solution to flutter/flutter#129289

Pre-Review Checklist

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-assist bot 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

  1. 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

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 applies diff-based version exemptions in update-release-info --version=minimal by passing a GitVersionFinder instance to checkPackageChangeState. A test case is added to verify that packages with only test dependency changes in build.gradle are skipped. Feedback suggests caching the GitVersionFinder instance to avoid redundant git process spawns across multiple packages.

The version and changelog validator passes a GitVersionFinder to
checkPackageChangeState, which enables the exemptions that inspect diff
contents, such as test-only Gradle dependency changes. The minimal mode
of update-release-info did not, so it bumped packages that the validator
would have accepted without a version change.
Both production callers now pass one, so the optional parameter only
left a silent mode where diff-based exemptions were skipped. Tests that
change Dart files now supply the diff they are classifying, and the
no-finder build.gradle test is dropped since that case no longer exists.
@jmagman
jmagman force-pushed the tool-update-release-info-git-exemptions branch from f347b1b to 2670407 Compare November 25, 2026 00:27
@jmagman
jmagman requested a review from stuartmorgan November 25, 2026 00:39

@stuartmorgan stuartmorgan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants