From ca3b9321b4701f70523b5f3e2c8ec558fb4dfbb8 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Wed, 20 Mar 2024 11:31:28 +0100 Subject: [PATCH 1/4] CI: add accidentally removed [contrib/**/*] in [changeset_lint_files] This line was accidentally removed in !12490. --- .gitlab/ci/jobs/test/oc.misc_checks-before_merging.yml | 1 + ci/bin/common.ml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitlab/ci/jobs/test/oc.misc_checks-before_merging.yml b/.gitlab/ci/jobs/test/oc.misc_checks-before_merging.yml index 0c7181292109..e3935e9cc62c 100644 --- a/.gitlab/ci/jobs/test/oc.misc_checks-before_merging.yml +++ b/.gitlab/ci/jobs/test/oc.misc_checks-before_merging.yml @@ -13,6 +13,7 @@ oc.misc_checks: - devtools/**/* - scripts/**/* - docs/**/* + - contrib/**/* - client-libs/**/* - etherlink/**/* - .gitlab-ci.yml diff --git a/ci/bin/common.ml b/ci/bin/common.ml index a1d04823373e..1048725670a3 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -348,6 +348,7 @@ let changeset_lint_files = "devtools/**/*"; "scripts/**/*"; "docs/**/*"; + "contrib/**/*"; "client-libs/**/*"; "etherlink/**/*"; ".gitlab-ci.yml"; -- GitLab From 20ad887f36a0c82c0bafebb4e8d523e540c2f6a2 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Wed, 20 Mar 2024 11:33:58 +0100 Subject: [PATCH 2/4] CI: remove unused template [.oc.misc_checks] Following the generation of this job in !12490, this hand-written template is no longer necessary. --- .gitlab/ci/jobs/shared/templates.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.gitlab/ci/jobs/shared/templates.yml b/.gitlab/ci/jobs/shared/templates.yml index c831e40d4390..20ed05e705b4 100644 --- a/.gitlab/ci/jobs/shared/templates.yml +++ b/.gitlab/ci/jobs/shared/templates.yml @@ -214,20 +214,6 @@ services: - docker:${DOCKER_VERSION}-dind -.oc.misc_checks: - extends: - - .default_settings_template - - .image_template__runtime_build_test_dependencies - - .needs__trigger - stage: "test" - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - # Load the environment poetry previously created in the docker image. - # Give access to the Python dependencies/executables - - . $HOME/.venv/bin/activate - .test_etherlink_kernel: extends: - .oc.kernels_template -- GitLab From f4316a99224e9b11dfe33118ab42bd8e4b90a7c5 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Wed, 20 Mar 2024 15:50:29 +0100 Subject: [PATCH 3/4] [contrib/ai-simulator/script-scrap-weeklynet.sh]: shfmt --- .../ai-simulator/script-scrap-weeklynet.sh | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/contrib/ai-simulator/script-scrap-weeklynet.sh b/contrib/ai-simulator/script-scrap-weeklynet.sh index 81bf358cd1da..146349663c92 100755 --- a/contrib/ai-simulator/script-scrap-weeklynet.sh +++ b/contrib/ai-simulator/script-scrap-weeklynet.sh @@ -13,39 +13,39 @@ l=$1 batch_size=10 -for (( i=0; i<=$l; i+=batch_size )); do +for ((i = 0; i <= $l; i += batch_size)); do - echo "Launching data request for batch starting with cycle: $i" + echo "Launching data request for batch starting with cycle: $i" - for (( n=i; n<$((i + batch_size)) && n<=$l; n++ )); do - block=$((128 * (1 + n))) + for ((n = i; n < $((i + batch_size)) && n <= $l; n++)); do + block=$((128 * (1 + n))) - (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_supply > "/tmp/ai-sim-supply/$n.txt" &) + (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_supply > "/tmp/ai-sim-supply/$n.txt" &) - (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_frozen_stake > "/tmp/ai-sim-frozen/$n.txt" &) - done - - for (( n=i; n<$((i + batch_size)) && n<=$l; n++ )); do - echo -ne "Looking for data $n\r" + (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_frozen_stake > "/tmp/ai-sim-frozen/$n.txt" &) + done - until [ -s "/tmp/ai-sim-supply/$n.txt" ]; do - sleep 0.1 - done - until [ -s "/tmp/ai-sim-frozen/$n.txt" ]; do - sleep 0.1 - done + for ((n = i; n < $((i + batch_size)) && n <= $l; n++)); do + echo -ne "Looking for data $n\r" - echo -ne "\r" + until [ -s "/tmp/ai-sim-supply/$n.txt" ]; do + sleep 0.1 done + until [ -s "/tmp/ai-sim-frozen/$n.txt" ]; do + sleep 0.1 + done + + echo -ne "\r" + done done for n in $(seq 0 $l); do - supply=$(cat "/tmp/ai-sim-supply/$n.txt") - frozen=$(cat "/tmp/ai-sim-frozen/$n.txt") + supply=$(cat "/tmp/ai-sim-supply/$n.txt") + frozen=$(cat "/tmp/ai-sim-frozen/$n.txt") - echo "$supply," >> src/total_supply_storage.js - echo "$frozen," >> src/total_frozen_stake_storage.js + echo "$supply," >> src/total_supply_storage.js + echo "$frozen," >> src/total_frozen_stake_storage.js done echo "];" >> src/total_supply_storage.js -- GitLab From 45227375767e0ca6cb43bc576965fffa3956e9b5 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Wed, 20 Mar 2024 15:51:01 +0100 Subject: [PATCH 4/4] [contrib/ai-simulator/script-scrap-weeklynet.sh]: shellcheck --- contrib/ai-simulator/script-scrap-weeklynet.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/ai-simulator/script-scrap-weeklynet.sh b/contrib/ai-simulator/script-scrap-weeklynet.sh index 146349663c92..a60730252fc8 100755 --- a/contrib/ai-simulator/script-scrap-weeklynet.sh +++ b/contrib/ai-simulator/script-scrap-weeklynet.sh @@ -13,11 +13,11 @@ l=$1 batch_size=10 -for ((i = 0; i <= $l; i += batch_size)); do +for ((i = 0; i <= l; i += batch_size)); do echo "Launching data request for batch starting with cycle: $i" - for ((n = i; n < $((i + batch_size)) && n <= $l; n++)); do + for ((n = i; n < $((i + batch_size)) && n <= l; n++)); do block=$((128 * (1 + n))) (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_supply > "/tmp/ai-sim-supply/$n.txt" &) @@ -25,7 +25,7 @@ for ((i = 0; i <= $l; i += batch_size)); do (curl -s https://rpc.weeklynet-2024-03-13.teztnets.com/chains/main/blocks/$block/context/total_frozen_stake > "/tmp/ai-sim-frozen/$n.txt" &) done - for ((n = i; n < $((i + batch_size)) && n <= $l; n++)); do + for ((n = i; n < $((i + batch_size)) && n <= l; n++)); do echo -ne "Looking for data $n\r" until [ -s "/tmp/ai-sim-supply/$n.txt" ]; do @@ -39,7 +39,7 @@ for ((i = 0; i <= $l; i += batch_size)); do done done -for n in $(seq 0 $l); do +for n in $(seq 0 "$l"); do supply=$(cat "/tmp/ai-sim-supply/$n.txt") frozen=$(cat "/tmp/ai-sim-frozen/$n.txt") -- GitLab