From 3219fd2e56cb7d5ad7abc70abaea633bf5cffb0c Mon Sep 17 00:00:00 2001 From: dkijania Date: Thu, 5 Sep 2024 22:54:58 +0200 Subject: [PATCH 1/5] remove network segment in rosetta dep key --- buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall | 2 +- buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall b/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall index 21397b34be7..4d7ae4b9c3b 100644 --- a/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall @@ -71,7 +71,7 @@ in Pipeline.build , depends_on = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Berkeley) + (None Network.Type) Profiles.Type.Standard Artifacts.Type.Rosetta } diff --git a/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall index 9fb8d631225..10ff09fea4e 100644 --- a/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall @@ -66,7 +66,7 @@ in Pipeline.build , depends_on = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Berkeley) + (None Network.Type) Profiles.Type.Standard Artifacts.Type.Rosetta } From 54bd0bfaa2fc6e297a9ce05c591e506e2fad5af7 Mon Sep 17 00:00:00 2001 From: dkijania Date: Thu, 5 Sep 2024 23:16:18 +0200 Subject: [PATCH 2/5] fix integration tests deps --- buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall | 4 ++-- buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index 9e8878d2918..5c8a2eeed5a 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -21,9 +21,9 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Berkeley) + (Some Network.Type.Devnet) Profiles.Type.Standard - Artifacts.Type.Rosetta + Artifacts.Type.Daemon # Dockers.dependsOn Dockers.Type.Bullseye (None Network.Type) diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall index c02eb9c5262..d75e12b2a35 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall @@ -21,7 +21,7 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Berkeley) + (Some Network.Type.Devnet) Profiles.Type.Standard Artifacts.Type.Daemon # Dockers.dependsOn From 2d58cc54c361921e5edf8f4b81494b30f6253b4a Mon Sep 17 00:00:00 2001 From: dkijania Date: Fri, 6 Sep 2024 07:55:12 +0200 Subject: [PATCH 3/5] Fix rosetta and it test deps --- buildkite/src/Constants/DockerVersions.dhall | 5 ++++- buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall | 2 +- buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall | 2 +- scripts/docker/helper.sh | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/buildkite/src/Constants/DockerVersions.dhall b/buildkite/src/Constants/DockerVersions.dhall index a09718f19e7..7db6179132c 100644 --- a/buildkite/src/Constants/DockerVersions.dhall +++ b/buildkite/src/Constants/DockerVersions.dhall @@ -60,7 +60,10 @@ let dependsOn = in merge { Bookworm = - [ { name = "${prefix}${profileSuffix}", key = key } ] + [ { name = "${prefix}${capitalName docker}${profileSuffix}" + , key = key + } + ] , Bullseye = [ { name = "${prefix}${capitalName docker}${profileSuffix}" , key = key diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index 5c8a2eeed5a..6b8fc98b3a0 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -21,7 +21,7 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Devnet) + (None Network.Type) Profiles.Type.Standard Artifacts.Type.Daemon # Dockers.dependsOn diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall index d75e12b2a35..e23fea5b155 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall @@ -21,7 +21,7 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (Some Network.Type.Devnet) + (None Network.Type) Profiles.Type.Standard Artifacts.Type.Daemon # Dockers.dependsOn diff --git a/scripts/docker/helper.sh b/scripts/docker/helper.sh index 20b7bca95af..07cf02af46a 100644 --- a/scripts/docker/helper.sh +++ b/scripts/docker/helper.sh @@ -18,7 +18,7 @@ function export_base_image () { function export_version () { case "${SERVICE}" in - mina-daemon|mina-batch-txn) export VERSION="${VERSION}-${NETWORK##*=}" ;; + mina-daemon|mina-batch-txn|mina-rosetta) export VERSION="${VERSION}-${NETWORK##*=}" ;; *) ;; esac } From 5693d4bac899cce36e6012871d45a2319a7cc8bb Mon Sep 17 00:00:00 2001 From: dkijania Date: Fri, 6 Sep 2024 08:30:30 +0200 Subject: [PATCH 4/5] fix deps once again --- buildkite/src/Command/RunWithPostgres.dhall | 15 ++++++++++++++- .../src/Jobs/Test/TestnetIntegrationTests.dhall | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/buildkite/src/Command/RunWithPostgres.dhall b/buildkite/src/Command/RunWithPostgres.dhall index c953576bd10..b6279112a23 100644 --- a/buildkite/src/Command/RunWithPostgres.dhall +++ b/buildkite/src/Command/RunWithPostgres.dhall @@ -4,6 +4,10 @@ let P = Prelude let Text/concatMap = P.Text.concatMap +let Optional/map = Prelude.Optional.map + +let Optional/default = Prelude.Optional.default + let Cmd = ../Lib/Cmds.dhall let ContainerImages = ../Constants/ContainerImages.dhall @@ -60,6 +64,15 @@ let runInDockerWithPostgresConn : Text = "\\\$MINA_DOCKER_TAG" + let maybeNetwork = + Optional/map + Network.Type + Text + (\(network : Network.Type) -> "-${Network.lowerName network}") + network + + let networkOrDefault = Optional/default Text "" maybeNetwork + in Cmd.chain [ "( docker stop ${postgresDockerName} && docker rm ${postgresDockerName} ) || true" , "source buildkite/scripts/export-git-env-vars.sh" @@ -67,7 +80,7 @@ let runInDockerWithPostgresConn , "sleep 5" , "docker exec ${postgresDockerName} psql ${pg_conn} -f /workdir/${initScript}" , "docker run --network host --volume ${outerDir}:/workdir --workdir /workdir --entrypoint bash ${envVars} gcr.io/o1labs-192920/${Artifacts.dockerName - docker}:${minaDockerTag} ${innerScript}" + docker}:${minaDockerTag}${networkOrDefault} ${innerScript}" ] in { runInDockerWithPostgresConn = runInDockerWithPostgresConn } diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index 6b8fc98b3a0..933a21bae6e 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -21,7 +21,7 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (None Network.Type) + (Some Network.Type.Berkeley) Profiles.Type.Standard Artifacts.Type.Daemon # Dockers.dependsOn From 6e3c08549da6e9dd9d148091364a5d123987f1a6 Mon Sep 17 00:00:00 2001 From: dkijania Date: Fri, 6 Sep 2024 09:06:56 +0200 Subject: [PATCH 5/5] fix testnet integration long tests --- buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall index e23fea5b155..c02eb9c5262 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall @@ -21,7 +21,7 @@ let Artifacts = ../../Constants/Artifacts.dhall let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye - (None Network.Type) + (Some Network.Type.Berkeley) Profiles.Type.Standard Artifacts.Type.Daemon # Dockers.dependsOn