-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dev] Remove version linter flakiness #14998
Changes from all commits
fc20bc2
47c1e1c
f1090c2
e922290
16301f8
43a532a
ad480f7
f7c523f
116737f
cfd963c
f0e0fb8
9b2f7dc
cb00ca0
986b458
0bce14d
6e1f858
dae6fb6
364dc02
7070709
6aacd2d
cb10b76
5dd6ff3
761bb46
f6b2908
3784938
f478e3b
288cd57
623a0a6
bfc3b43
3153a70
990c246
8ea7951
0d2e08b
ef880f2
dc0bb55
5ff92fd
008349a
8a46519
b94b52a
31b679c
c7df146
b512989
51bd8ed
7bd211b
510684d
7a3f168
db05019
53af55a
8d07032
d0d4133
951cff3
11d6168
7b598f1
5d49bb5
7bc63f1
541c708
33916bc
2cc894f
766ae01
a12d214
ddf6f58
d475ab4
fb33d0c
793e038
63a1b23
9255f11
cc26f6c
64cf331
13db715
688c449
2d1db26
64e6213
fc55de9
abd62e6
43ac16a
24d56e6
6a79394
0922582
38208cb
65b6b09
c327264
07796e6
ef68bf3
ed67a5e
4de35ad
36829c6
72c6d04
dd8dca7
7530ac4
ccf827d
42270d3
33dedec
f6f8e3d
4f16f98
f72f238
4ed3b36
15850a8
711d350
e8bbaaf
0d02435
b027e32
523986d
2d406a0
7b43990
24feae3
8def3cf
561b2e7
0d12764
cb9eebb
1e4eec5
ccba649
f40759d
3c4f7d8
b53580c
93fa787
c775816
815d1d1
64a960e
9356c0a
97a1a87
2472c2f
f870ff3
4dd8beb
33cfd01
8e44523
73e851a
eb7ccc2
7f85c14
11362e7
2b73046
1cea845
01ec9bb
2de6151
59e6ccc
182467c
32b6d92
a9747d0
32aec5c
fb20408
18b1dee
3e98617
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/bash | ||
|
||
|
||
if [[ $# -gt 2 ]] || [[ $# -lt 1 ]]; then | ||
echo "Usage: $0 '<debians>' '[use-sudo]'" | ||
exit 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
KEY_FILE=/var/secrets/google/key.json | ||
|
||
if [ ! -f $KEY_FILE ]; then | ||
echo "Cannot use gsutil for upload as key file cannot be found in $KEY_FILE" | ||
fi | ||
|
||
gcloud auth activate-service-account --key-file=$KEY_FILE | ||
|
||
gsutil cp $1 $2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
set -eox pipefail | ||
|
||
if [[ $# -ne 1 ]]; then | ||
echo "Usage: $0 <release-branch>" | ||
exit 1 | ||
fi | ||
|
||
git config --global --add safe.directory /workdir | ||
|
||
source buildkite/scripts/handle-fork.sh | ||
source buildkite/scripts/export-git-env-vars.sh | ||
|
||
release_branch=${REMOTE}/$1 | ||
|
||
RELEASE_BRANCH_COMMIT=$(git log -n 1 --format="%h" --abbrev=7 $release_branch) | ||
|
||
function revert_checkout() { | ||
git checkout $BUILDKITE_COMMIT | ||
git submodule sync | ||
git submodule update --init --recursive | ||
} | ||
|
||
function checkout_and_dump() { | ||
local __commit=$1 | ||
git checkout $__commit | ||
git submodule sync | ||
git submodule update --init --recursive | ||
eval $(opam config env) | ||
TYPE_SHAPE_FILE=${__commit:0:7}-type_shape.txt | ||
dune exec src/app/cli/src/mina.exe internal dump-type-shapes > /tmp/${TYPE_SHAPE_FILE} | ||
revert_checkout | ||
source buildkite/scripts/gsutil-upload.sh /tmp/${TYPE_SHAPE_FILE} gs://mina-type-shapes | ||
} | ||
|
||
if ! $(gsutil ls gs://mina-type-shapes/$RELEASE_BRANCH_COMMIT 2>/dev/null); then | ||
checkout_and_dump $RELEASE_BRANCH_COMMIT | ||
fi | ||
|
||
if [[ -n "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}" ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? I see that we have a check for the PR branch in version linter, but do we really need that check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are running or rerunning pipeline directly from BK this variable is not set. We want to make sure version linter works also when running not through !ci-build-me |
||
BUILDKITE_PULL_REQUEST_BASE_BRANCH_COMMIT=$(git log -n 1 --format="%h" --abbrev=7 ${REMOTE}/${BUILDKITE_PULL_REQUEST_BASE_BRANCH} ) | ||
if ! $(gsutil ls gs://mina-type-shapes/$BUILDKITE_PULL_REQUEST_BASE_BRANCH_COMMIT 2>/dev/null); then | ||
checkout_and_dump $BUILDKITE_PULL_REQUEST_BASE_BRANCH_COMMIT | ||
fi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is
${REMOTE}
in context of this script? Is it a variable provided by Buildkite?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is set in handle-fork script. It was introduced during ITN time to allow running bk on forks