-
Notifications
You must be signed in to change notification settings - Fork 529
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
[Master] Patch missing type shapes #16154
Merged
mrmr1993
merged 30 commits into
master
from
dkijania/generate_version_lint_inafly_master
Oct 28, 2024
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4de35ad
Patch missing type shapes
dkijania 36829c6
use soft_fail in VerisionLint dhall
dkijania 72c6d04
move gsutil upload to docker
dkijania dd8dca7
dhall make lint
dkijania 7530ac4
do not copy debian key
dkijania ccf827d
fix path to key.json
dkijania 42270d3
upload file after revert
dkijania 33dedec
remove no-merges from git log and patch version linter for base branc…
dkijania f6f8e3d
add remote when evaluating commit
dkijania 4f16f98
fix variable checking
dkijania b027e32
Revert unnecessary changes
dkijania 523986d
more revert
dkijania cb9eebb
fix typo and use shorter BUILDKITE_COMMIT when looking for reference …
dkijania 1e4eec5
add requests import to version-linter.py
dkijania 93fa787
remove duplicated check for mina-type-shape which should be assured i…
dkijania 64a960e
removing (faulty) code which tries to find ref file on last 10 commits
dkijania 2472c2f
rename function to signal only one commit will be returned
dkijania 33cfd01
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania eb7ccc2
clean up code. remove unused functions
dkijania 7f85c14
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania 11362e7
strip string when calculating commit
dkijania 2b73046
Merge remote-tracking branch 'origin/dkijania/generate_version_lint_i…
dkijania 2de6151
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania 59e6ccc
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania 182467c
Revert "Auxiliary commit to revert individual files from b027e324d6ff…
dkijania 32b6d92
revert Lib/Cmds.dhall change
dkijania 32aec5c
bring back secrets volume
dkijania a43a260
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania 9aa8585
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania 8160eb9
Merge branch 'master' into dkijania/generate_version_lint_inafly_master
dkijania File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
46 changes: 46 additions & 0 deletions
46
buildkite/scripts/version-linter-patch-missing-type-shapes.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
mrmr1993 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is this now necessary?
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.
We did an effort recently to setup agents in a way that now env vars which allows to correctly setup gsutil are passed to toolchain and allow us to upload file to gs directly from toolchain. Previously we had to ran gsutil directly from agent which was a bit of dance (dumping file on toolchains, then uploading on agents level).
In
VersionLinter.dhall
i removed line with upload to gcloud bucket