From a67eb265178e04a39e752d2f484132e4064d7890 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 25 Oct 2023 18:23:49 +0200 Subject: [PATCH 1/4] add exception for o1js to merges-cleanly job --- buildkite/scripts/merges-cleanly.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildkite/scripts/merges-cleanly.sh b/buildkite/scripts/merges-cleanly.sh index 29693d980d4..71f6a566800 100755 --- a/buildkite/scripts/merges-cleanly.sh +++ b/buildkite/scripts/merges-cleanly.sh @@ -32,6 +32,12 @@ if [ $RET -eq 0 ]; then echo "No conflicts found against upstream branch ${BRANCH}" exit 0 else + # exclude branches for which merging cleanly is not a hard requirement + if [ "${CURRENT}" == "o1js-main" ]; then + echo "Conflicts were found, but the current branch does not have to merge cleanly. Exiting with code 0." + exit 0 + fi + # Found a conflict echo "[ERROR] This pull request conflicts with $BRANCH, please open a new pull request against $BRANCH at this link:" echo "https://github.com/MinaProtocol/mina/compare/${BRANCH}...${BUILDKITE_BRANCH}" From 8d431fa8beb023d8215f85c3c81dd6032f5365ac Mon Sep 17 00:00:00 2001 From: dkijania Date: Wed, 25 Oct 2023 18:25:35 +0200 Subject: [PATCH 2/4] add o1js-main branch case in snark-transaction-profiler-script --- buildkite/scripts/run-snark-transaction-profiler.sh | 3 +-- buildkite/src/Constants/DebianVersions.dhall | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildkite/scripts/run-snark-transaction-profiler.sh b/buildkite/scripts/run-snark-transaction-profiler.sh index 31d7bd8777a..6a2d1f23bf2 100755 --- a/buildkite/scripts/run-snark-transaction-profiler.sh +++ b/buildkite/scripts/run-snark-transaction-profiler.sh @@ -9,7 +9,7 @@ apt-get update apt-get install -y git apt-transport-https ca-certificates tzdata curl python3 case "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" in - rampup|berkeley|release/2.0.0|develop) + rampup|berkeley|release/2.0.0|develop|o1js-main) TESTNET_NAME="berkeley" ;; *) @@ -17,7 +17,6 @@ case "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" in esac git config --global --add safe.directory /workdir - source buildkite/scripts/export-git-env-vars.sh echo "Installing mina daemon package: mina-${TESTNET_NAME}=${MINA_DEB_VERSION}" diff --git a/buildkite/src/Constants/DebianVersions.dhall b/buildkite/src/Constants/DebianVersions.dhall index 6f9bbb30803..0ef0ee92cf7 100644 --- a/buildkite/src/Constants/DebianVersions.dhall +++ b/buildkite/src/Constants/DebianVersions.dhall @@ -66,7 +66,8 @@ let minimalDirtyWhen = [ S.strictlyStart (S.contains "dockerfiles/stages"), S.exactly "scripts/rebuild-deb" "sh", S.exactly "scripts/release-docker" "sh", - S.exactly "buildkite/scripts/build-artifact" "sh" + S.exactly "buildkite/scripts/build-artifact" "sh", + S.exactly "buildkite/scripts/run-snark-transaction-profiler" "sh" ] -- The default debian version (Bullseye) is used in all downstream CI jobs From dcdd8891b12378a3711e093c983b5034f6717361 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 25 Oct 2023 19:18:42 +0200 Subject: [PATCH 3/4] try something else --- buildkite/scripts/merges-cleanly.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildkite/scripts/merges-cleanly.sh b/buildkite/scripts/merges-cleanly.sh index 71f6a566800..b90f721ec2c 100755 --- a/buildkite/scripts/merges-cleanly.sh +++ b/buildkite/scripts/merges-cleanly.sh @@ -2,7 +2,7 @@ BRANCH=$1 CURRENT=$(git branch --show-current) -echo 'Testing for conflicts between the current branch `'"${CURRENT}"'` and `'"${BRANCH}"'`...' +echo 'Testing for conflicts between the current branch `'"${BUILDKITE_BRANCH}"'` and `'"${BRANCH}"'`...' # Adapted from this stackoverflow answer: https://stackoverflow.com/a/10856937 # The git merge-tree command shows the content of a 3-way merge without @@ -33,7 +33,7 @@ if [ $RET -eq 0 ]; then exit 0 else # exclude branches for which merging cleanly is not a hard requirement - if [ "${CURRENT}" == "o1js-main" ]; then + if [ "${BUILDKITE_BRANCH}" == "o1js-main" ]; then echo "Conflicts were found, but the current branch does not have to merge cleanly. Exiting with code 0." exit 0 fi From 182f4107a35cdd8b46a0132082b106dba9742bd2 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 25 Oct 2023 19:46:53 +0200 Subject: [PATCH 4/4] this looks promising --- buildkite/scripts/merges-cleanly.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildkite/scripts/merges-cleanly.sh b/buildkite/scripts/merges-cleanly.sh index b90f721ec2c..871dd30479a 100755 --- a/buildkite/scripts/merges-cleanly.sh +++ b/buildkite/scripts/merges-cleanly.sh @@ -2,7 +2,7 @@ BRANCH=$1 CURRENT=$(git branch --show-current) -echo 'Testing for conflicts between the current branch `'"${BUILDKITE_BRANCH}"'` and `'"${BRANCH}"'`...' +echo 'Testing for conflicts between the current branch `'"${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"'` and `'"${BRANCH}"'`...' # Adapted from this stackoverflow answer: https://stackoverflow.com/a/10856937 # The git merge-tree command shows the content of a 3-way merge without @@ -33,7 +33,7 @@ if [ $RET -eq 0 ]; then exit 0 else # exclude branches for which merging cleanly is not a hard requirement - if [ "${BUILDKITE_BRANCH}" == "o1js-main" ]; then + if [ "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" == "o1js-main" ]; then echo "Conflicts were found, but the current branch does not have to merge cleanly. Exiting with code 0." exit 0 fi