When looking up git commits, find_commit.dart uses a git log invocation here:
|
return git(secondaryRepoDirectory, <String>[ |
|
'log', |
|
'--format=%H', |
|
'--until=${anchor.timestamp.toIso8601String()}', |
|
'--max-count=1', |
|
secondaryBranch, |
|
'--', |
|
]); |
This is called from here:
|
print(findCommit( |
|
primaryRepoDirectory: primaryRepo, |
|
primaryBranch: git(primaryRepo, <String>['rev-parse', '--abbrev-ref', 'HEAD']).trim(), |
|
primaryTrunk: 'master', |
|
secondaryRepoDirectory: secondaryRepo, |
|
secondaryBranch: 'master', |
|
).trim()); |
Since we hardcode master as both the primary and secondary repo branches, it will fail for repos that have only a main branch and no master, such as flutter/cocoon.
See example failure here:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8797370543676737825/+/u/Customer_testing/customer_testing/test_stderr
Related, but we should probably fail whichever tools are using find_commit.dart if the lookup fails. In the log above it looks like even though the lookup fails, we continue on and run the tests anyway:
git -C ../../bin/cache/pkg/tests checkout
dart --enable-asserts run_tests.dart
Note the lack of SHA in the checkout command, which I presume is meant to be there.
When looking up git commits, find_commit.dart uses a
git loginvocation here:flutter/dev/tools/bin/find_commit.dart
Lines 68 to 75 in a2233ea
This is called from here:
flutter/dev/tools/bin/find_commit.dart
Lines 99 to 105 in a2233ea
Since we hardcode
masteras both the primary and secondary repo branches, it will fail for repos that have only amainbranch and nomaster, such as flutter/cocoon.See example failure here:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8797370543676737825/+/u/Customer_testing/customer_testing/test_stderr
Related, but we should probably fail whichever tools are using find_commit.dart if the lookup fails. In the log above it looks like even though the lookup fails, we continue on and run the tests anyway:
Note the lack of SHA in the checkout command, which I presume is meant to be there.