Skip to content

Commit

Permalink
[infra] Improve efficiency of cloning the Flutter repositories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
athomas committed Dec 9, 2019
1 parent 42799b6 commit cb94390
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/bots/flutter/analyze_flutter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ cleanup() {
trap cleanup EXIT HUP INT QUIT TERM PIPE
cd "$tmpdir"

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

cd flutter

Expand Down
7 changes: 5 additions & 2 deletions tools/bots/flutter/compile_flutter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ cleanup() {
trap cleanup EXIT HUP INT QUIT TERM PIPE
pushd "$tmpdir"

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

pushd flutter
bin/flutter config --no-analytics
Expand All @@ -26,13 +27,15 @@ patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch
if [ -e "$patch" ]; then
git apply $patch
fi

bin/flutter update-packages
popd

# Directly in temp directory again.
mkdir src
pushd src
git clone -vv --depth 1 https://chromium.googlesource.com/external/github.com/flutter/engine flutter
git clone --single-branch --depth=1 -vv \
https://dart.googlesource.com/external/github.com/flutter/engine flutter
mkdir third_party
pushd third_party
ln -s $checkout dart
Expand Down

0 comments on commit cb94390

Please sign in to comment.