Skip to content

Commit cb94390

Browse files
committed
[infra] Improve efficiency of cloning the Flutter repositories
Sometimes the flutter-analyze builder is flaky because cloning Flutter exhausts the "short term ls-remote rate limit". "--single-branch" reduces how many remotes need to be fetched. Also in this CL: * Use dart.googlesource.com. * Apply the same changes to the flutter-frontend builder. Error example: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8894556948308224672/+/steps/analyze_flutter/0/stdout Change-Id: I50df781a652602c7dd1b40b938c558b04bd3f86f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127642 Reviewed-by: Jonas Termansen <sortie@google.com>
1 parent 42799b6 commit cb94390

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tools/bots/flutter/analyze_flutter.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ cleanup() {
1616
trap cleanup EXIT HUP INT QUIT TERM PIPE
1717
cd "$tmpdir"
1818

19-
git clone -vv https://chromium.googlesource.com/external/github.com/flutter/flutter
19+
git clone --single-branch -vv \
20+
https://dart.googlesource.com/external/github.com/flutter/flutter
2021

2122
cd flutter
2223

tools/bots/flutter/compile_flutter.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ cleanup() {
1717
trap cleanup EXIT HUP INT QUIT TERM PIPE
1818
pushd "$tmpdir"
1919

20-
git clone -vv https://chromium.googlesource.com/external/github.com/flutter/flutter
20+
git clone --single-branch -vv \
21+
https://dart.googlesource.com/external/github.com/flutter/flutter
2122

2223
pushd flutter
2324
bin/flutter config --no-analytics
@@ -26,13 +27,15 @@ patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch
2627
if [ -e "$patch" ]; then
2728
git apply $patch
2829
fi
30+
2931
bin/flutter update-packages
3032
popd
3133

3234
# Directly in temp directory again.
3335
mkdir src
3436
pushd src
35-
git clone -vv --depth 1 https://chromium.googlesource.com/external/github.com/flutter/engine flutter
37+
git clone --single-branch --depth=1 -vv \
38+
https://dart.googlesource.com/external/github.com/flutter/engine flutter
3639
mkdir third_party
3740
pushd third_party
3841
ln -s $checkout dart

0 commit comments

Comments
 (0)