Skip to content

[tool] Add config options needed by core-packages#11784

Merged
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:tool-core-packages-support
May 27, 2026
Merged

[tool] Add config options needed by core-packages#11784
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:tool-core-packages-support

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Adds some optional behaviors needed to use the tool in flutter/core-packages:

  • Allow setting a min Dart version rather than a min Flutter version at the repo level
  • Don't require .ci.yaml to be present when batch config isn't used (since that repo currently doesn't use LUCI)

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 26, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a 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 introduces min_dart as an alternative to min_flutter in the repository tool configuration, updating the validation logic to check Dart SDK constraints accordingly. It also makes the .ci.yaml file optional during validation when batched releases are not used. Review feedback suggests handling potential FormatException errors when parsing version strings and correcting a configuration mismatch in the newly added tests where isFlutter: true was incorrectly set for non-Flutter package test cases.

Comment thread script/tool/lib/src/validate_command.dart
Comment thread script/tool/test/validate_command_pubspec_test.dart
Comment thread script/tool/test/validate_command_pubspec_test.dart
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label May 26, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@chunhtai chunhtai self-requested a review May 26, 2026 18:51
Comment thread script/tool/lib/src/common/tool_config.dart
Comment thread script/tool/lib/src/validate_command.dart Outdated
}) {
final errors = <String>[];
final File ciYamlFile = repoRoot.childFile('.ci.yaml');
if (!ciYamlFile.existsSync()) {
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.

why do we bar batch release based on .ci.yaml? IIRC, batch release infra are mostly based on GA and didn't rely on ci.yaml. Or is this a indirect way to disable the batch release for core-package?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because the next non-new line in this file unconditionally reads ciYamlFile, and that will explode if, as is currently the case in core-packages, there is no such file.

Rather than speculatively implement an alternate codepath that does the same validation for a non-LUCI-based configuration that we've never built and may never need, I'm just describing the actual state of the tooling.

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.

oh ok, I think we can just return without the print error then.

The reason behind this check for batch release is the we have to add a enable_branch in ci.yaml to make sure the luci ci runs.

If it doesn't exist, then we don't need to worry about having the enable_branch check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Why wouldn't the same basic requirement apply to a repo using GA to run CI, given that GA also has branch restrictions in configurations?

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.

yeah the same will apply if we use GA to run ci, but this helper method is specific for ci.yaml.

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.

oh I see the reasoning, so until we implement the GA restriction, batch release is not supported. yeah I think that makes sense too.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 26, 2026
Copy link
Copy Markdown
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label May 27, 2026
@auto-submit auto-submit Bot merged commit a23326a into flutter:main May 27, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants