Skip to content

Conversation

@godofredoc
Copy link
Contributor

@godofredoc godofredoc commented Nov 18, 2023

This will allow Dart Team to run customer tests as part of monorepo and will be a step forward to remove ad_hoc tests.

Bug: dart-lang/sdk#51042
Bug: #115476

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Comment on lines 1572 to 1580
Copy link
Contributor

@christopherfujino christopherfujino Nov 20, 2023

Choose a reason for hiding this comment

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

looks like git checkout HEAD is a no-op https://github.com/git/git/blob/ad7044857660af7ffaaf8fbbccc77b817d1b938f/builtin/checkout.c#L624 (HEAD is what we have currently checked out), thus let's only run the command if revision != null:

Suggested change
final String revision = env['REVISION'] ?? 'HEAD';
await runCommand(
'git',
<String>[
'checkout',
revision,
],
workingDirectory: flutterRoot,
);
final String? revision = env['REVISION'];
if (revision != null) {
await runCommand(
'git',
const <String>[
'checkout',
revision,
],
workingDirectory: flutterRoot,
);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

in what cases would env['REVISION'] not be set? just when run locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like git checkout HEAD is a no-op (HEAD is what we have currently checked out), thus let's only run the command if revision != null:

Applied the suggestion.

TESTOWNERS Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

is this change effectively commenting out the customer_testing test owner logic? if so, why? if not, how does this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test owners validation is using "# " for shard validations.

.ci.yaml Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

so, we're expecting presubmits to not reflect this change, because compiling ci.yaml to lucicfg configs happens post-submit, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like win is failing:

║ ProcessException: The system cannot find the file specified.
║ 
║   Command: ci.bat 
║ #0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
║ #1      Process.start (dart:io-patch/process_patch.dart:38:20)
║ #2      startCommand (file:///C:/b/s/w/ir/x/w/flutter/dev/bots/run_command.dart:97:47)
║ #3      runCommand (file:///C:/b/s/w/ir/x/w/flutter/dev/bots/run_command.dart:165:33)
║ #4      _runCustomerTesting (file:///C:/b/s/w/ir/x/w/flutter/dev/bots/test.dart:1583:9)
║ <asynchronous suspension>
║ #5      _runFromList (file:///C:/b/s/w/ir/x/w/flutter/dev/bots/test.dart:2175:5)
║ <asynchronous suspension>
║ #6      main (file:///C:/b/s/w/ir/x/w/flutter/dev/bots/test.dart:247:5)
║ <asynchronous suspension>
║ 
║ The test.dart script should be corrected to catch this error and call foundError().
║ Some tests are likely to have been skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taking a look, I realized I didn't run on win before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem was that windows wants bat files to be executed using full path rather than a relative one.

Copy link
Contributor

Choose a reason for hiding this comment

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

lol

Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain this diff? i have no batch foo.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh wait, nvm, i see the diff on find_commit.dart

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is sending two more parameters to find_commit.

find_commit <first repo checkout in this case flutter/flutter> <branch of first repo (master)> <second repo checkout in this case flutter/tests> <branch of second repo(main)>

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh i see, confusingly in the old version, the first arg was optional. this LGTM

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM, other than the failing windows LED build.

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh i see, confusingly in the old version, the first arg was optional. this LGTM

@goderbauer goderbauer added framework flutter/packages/flutter repository. See also f: labels. team-infra Owned by Infrastructure team labels Nov 21, 2023
@godofredoc godofredoc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 27, 2023
@godofredoc godofredoc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 28, 2023
@auto-submit auto-submit bot merged commit fe7299d into flutter:master Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 29, 2023
caseycrogers pushed a commit to caseycrogers/flutter that referenced this pull request Dec 29, 2023
This will allow Dart Team to run customer tests as part of monorepo and will be a step forward to remove ad_hoc tests.

Bug: dart-lang/sdk#51042
Bug: flutter#115476
whesse added a commit to whesse/flutter that referenced this pull request Jan 5, 2024
The migration of customer tests to sharded tests adds a step
that checks out the current tip-of-tree of the framework repo,
removing local changes. This does not work with monorepo
testing, which modifies engine.version, and does not work with
local testing of a branch.

The sharded tests should already be running with the correct
checkout of the framework repo. If the REVISION environment
variable is set, the framework checkout will still be
reset to check out that revision.

These commands were migrated from the existing shell script
to the sharded tester in
flutter#138659

Bug: dart-lang/sdk#51042
@whesse
Copy link
Contributor

whesse commented Jan 5, 2024

The command that checks out HEAD of the framework repo if no REVISON env variable is set should not be needed when running as a sharded test.
The sharded tests already have the framework repo checked out with the right contents. In the case of monorepo testing, and for local testing of changes, there are local changes to the checkout that must not be deleted before running tests.
These cause the test to fail, when the checkout of HEAD conflicts with them, or else are improperly overridden.
In the monorepo testing, engine.version is modified to check out the correct artifacts from the custom path.

I have uploaded a PR to remove this as #141013

@godofredoc godofredoc deleted the migrate_customer_testing branch January 5, 2024 17:45
auto-submit bot pushed a commit that referenced this pull request Jan 12, 2024
The migration of customer tests to sharded tests adds a step that checks out the current tip-of-tree of the framework repo, removing local changes. This does not work with monorepo testing, which modifies engine.version, and does not work with local testing of a branch.

The sharded tests should already be running with the correct checkout of the framework repo. If the REVISION environment variable is set, the framework checkout will still be reset to check out that revision.

These commands were migrated from the existing shell script to the sharded tester in
#138659

Bug: dart-lang/sdk#51042
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
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 framework flutter/packages/flutter repository. See also f: labels. team-infra Owned by Infrastructure team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants