Skip to content

Commit 2c01e22

Browse files
authored
Merge branch 'compatible' into georgeee/remove-unnecessary-submodules-mini
2 parents 180d1b9 + ca017af commit 2c01e22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+924
-206
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ automation/services/watchdog/check_libp2p/check_libp2p
8080
*.terraform.lock.hcl
8181
*gcloud-keyfile.json*
8282
_opam
83+
opam_switches
8384

8485
target
8586
./release

Makefile

+18-11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ ifeq ($(DUNE_PROFILE),)
1212
DUNE_PROFILE := dev
1313
endif
1414

15+
ifeq ($(OPAMSWITCH)$(IN_NIX_SHELL)$(CI)$(BUILDKITE),)
16+
# Sometimes opam replaces these env variables in shell with
17+
# an explicit mention of a particular switch (dereferenced from the value)
18+
OPAM_SWITCH_PREFIX := $(PWD)/_opam
19+
OCAML_TOPLEVEL_PATH := $(OPAM_SWITCH_PREFIX)/lib/toplevel
20+
PATH := $(OPAM_SWITCH_PREFIX)/bin:$(PATH)
21+
endif
22+
1523
# Temp directory
1624
TMPDIR ?= /tmp
1725

@@ -43,28 +51,27 @@ clean:
4351
@rm -rf src/$(COVERAGE_DIR)
4452
@rm -rf src/app/libp2p_helper/result src/libp2p_ipc/libp2p_ipc.capnp.go
4553

54+
switch:
55+
./scripts/update-opam-switch.sh
56+
4657
# enforces the OCaml version being used
47-
ocaml_version:
58+
ocaml_version: switch
4859
@if ! ocamlopt -config | grep "version:" | grep $(OCAML_VERSION); then echo "incorrect OCaml version, expected version $(OCAML_VERSION)" ; exit 1; fi
4960

5061
# enforce machine word size
51-
ocaml_word_size:
62+
ocaml_word_size: switch
5263
@if ! ocamlopt -config | grep "word_size:" | grep $(WORD_SIZE); then echo "invalid machine word size, expected $(WORD_SIZE)" ; exit 1; fi
5364

5465

5566
# Checks that the current opam switch contains the packages from opam.export at the same version.
5667
# This check is disabled in the pure nix environment (that does not use opam).
57-
check_opam_switch:
68+
check_opam_switch: switch
5869
ifneq ($(DISABLE_CHECK_OPAM_SWITCH), true)
59-
ifeq (, $(shell which check_opam_switch))
60-
$(warning The check_opam_switch binary was not found in the PATH.)
61-
$(error The current opam switch should likely be updated by running: "opam switch import opam.export")
62-
else
63-
check_opam_switch opam.export
64-
endif
70+
@which check_opam_switch 2>/dev/null >/dev/null || ( echo "The check_opam_switch binary was not found in the PATH, try: opam switch import opam.export" >&2 && exit 1 )
71+
@check_opam_switch opam.export
6572
endif
6673

67-
ocaml_checks: ocaml_version ocaml_word_size check_opam_switch
74+
ocaml_checks: switch ocaml_version ocaml_word_size check_opam_switch
6875

6976
libp2p_helper:
7077
ifeq (, $(MINA_LIBP2P_HELPER_PATH))
@@ -304,4 +311,4 @@ ml-docs: ocaml_checks
304311
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
305312
# HACK: cat Makefile | egrep '^\w.*' | sed 's/:/ /' | awk '{print $1}' | grep -v myprocs | sort | xargs
306313

307-
.PHONY: all build check-format clean deb dev mina-docker reformat doc_diagrams ml-docs macos-setup macos-setup-download setup-opam libp2p_helper dhall_types replayer missing_blocks_auditor extract_blocks archive_blocks ocaml_version ocaml_word_size ocaml_checks
314+
.PHONY: all build check-format clean deb dev mina-docker reformat doc_diagrams ml-docs macos-setup macos-setup-download setup-opam libp2p_helper dhall_types replayer missing_blocks_auditor extract_blocks archive_blocks ocaml_version ocaml_word_size ocaml_checks switch

README-ci-failures.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ details and links to the failures.
2929
## CI environment mismatch
3030

3131
The CI runs its jobs in multiple Docker images. The images that it is using are
32-
specified in `buildkite/src/Constants/COntainerImages.dhall`: the CI uses all
33-
Debian images prefixed by `minaToolchainBuster`.
32+
specified in `buildkite/src/Constants/ContainerImages.dhall`: the CI uses all
33+
Debian images prefixed by `minaToolchainBullseye`.
3434

3535
These images are generated by the CI itself, in particular based on the content of the
3636
`dockerfiles` directory and the `opam.export` file (which describes versions of
@@ -46,7 +46,7 @@ In this case, you should:
4646
[Google Cloud](https://console.cloud.google.com/gcr/images/o1labs-192920/global/mina-toolchain)
4747
where they have been automatically uploaded. Look for your branch name and
4848
commit hash in the second column. You should find several images suffixed
49-
with `-buster`, `-bullseye`, `-stretch` and `-focal` (Debian versions).
49+
with `-bullseye` and `-focal` (Debian versions).
5050
3. For each such image, retrieve its full name and hash by hovering its link and
5151
clicking the `Copy full image name` tooltip that appears (or retrieve it on
5252
the image's page).

buildkite/scripts/run_promote_build_job.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# - "NETWORK=Devnet"
1919
# - "FROM_VERSION=3.0.0devnet-tooling-dkijania-hardfork-package-gen-in-nightly-b37f50e"
2020
# - "NEW_VERSION=3.0.0fake-ddb6fc4"
21-
# - "CODENAMES=Focal,Buster,Bullseye"
21+
# - "CODENAMES=Focal,Bullseye"
2222
# - "FROM_CHANNEL=Unstable"
2323
# - "TO_CHANNEL=Experimental"
2424
# image: codaprotocol/ci-toolchain-base:v3
@@ -41,7 +41,7 @@ function usage() {
4141
fi
4242
echo " DEBIANS The comma delimitered debian names. For example: 'Daemon,Archive' "
4343
echo " DOCKERS The comma delimitered docker names. For example: 'Daemon,Archive' "
44-
echo " CODENAMES The Debian codenames (Bullseye, Buster etc.)"
44+
echo " CODENAMES The Debian codenames (Bullseye, Focal etc.)"
4545
echo " FROM_VERSION The Source Docker or Debian version "
4646
echo " NEW_VERSION The new Debian version or new Docker tag"
4747
echo " REMOVE_PROFILE_FROM_NAME Should we remove profile suffix from debian name"

buildkite/scripts/run_verify_promoted_build_job.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# - "NETWORK=Devnet"
1919
# - "FROM_VERSION=3.0.0devnet-tooling-dkijania-hardfork-package-gen-in-nightly-b37f50e"
2020
# - "NEW_VERSION=3.0.0fake-ddb6fc4"
21-
# - "CODENAMES=Focal,Buster,Bullseye"
21+
# - "CODENAMES=Focal,Bullseye"
2222
# - "FROM_CHANNEL=Unstable"
2323
# - "TO_CHANNEL=Experimental"
2424
# image: codaprotocol/ci-toolchain-base:v3
@@ -41,7 +41,7 @@ function usage() {
4141
fi
4242
echo " DEBIANS The comma delimitered debian names. For example: 'Daemon,Archive' "
4343
echo " DOCKERS The comma delimitered docker names. For example: 'Daemon,Archive' "
44-
echo " CODENAMES The Debian codenames (Bullseye, Buster etc.)"
44+
echo " CODENAMES The Debian codenames (Bullseye, Focal etc.)"
4545
echo " NEW_VERSION The new Debian version or new Docker tag"
4646
echo " REMOVE_PROFILE_FROM_NAME Should we remove profile suffix from debian name"
4747
echo " PROFILE The Docker and Debian profile (Standard, Lightnet)"

buildkite/src/Command/RunInToolchain.dhall

-10
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ let runInToolchainBullseye
3333
environment
3434
innerScript
3535

36-
let runInToolchainBuster
37-
: List Text -> Text -> List Cmd.Type
38-
= \(environment : List Text)
39-
-> \(innerScript : Text)
40-
-> runInToolchainImage
41-
ContainerImages.minaToolchainBuster
42-
environment
43-
innerScript
44-
4536
let runInToolchain
4637
: List Text -> Text -> List Cmd.Type
4738
= \(environment : List Text)
@@ -55,5 +46,4 @@ in { runInToolchain = runInToolchain
5546
, runInToolchainImage = runInToolchainImage
5647
, runInToolchainBookworm = runInToolchainBookworm
5748
, runInToolchainBullseye = runInToolchainBullseye
58-
, runInToolchainBuster = runInToolchainBuster
5949
}

buildkite/src/Constants/DebianVersions.dhall

+1-12
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ let BuildFlags = ./BuildFlags.dhall
44

55
let S = ../Lib/SelectFiles.dhall
66

7-
let DebVersion = < Bookworm | Bullseye | Buster | Jammy | Focal >
7+
let DebVersion = < Bookworm | Bullseye | Jammy | Focal >
88

99
let capitalName =
1010
\(debVersion : DebVersion)
1111
-> merge
1212
{ Bookworm = "Bookworm"
1313
, Bullseye = "Bullseye"
14-
, Buster = "Buster"
1514
, Jammy = "Jammy"
1615
, Focal = "Focal"
1716
}
@@ -22,7 +21,6 @@ let lowerName =
2221
-> merge
2322
{ Bookworm = "bookworm"
2423
, Bullseye = "bullseye"
25-
, Buster = "buster"
2624
, Jammy = "jammy"
2725
, Focal = "focal"
2826
}
@@ -53,14 +51,6 @@ let dependsOnStep =
5351
, key = "${step}-deb-pkg"
5452
}
5553
]
56-
, Buster =
57-
[ { name =
58-
"${prefix}${capitalName
59-
debVersion}${profileSuffix}${BuildFlags.toSuffixUppercase
60-
buildFlag}"
61-
, key = "${step}-deb-pkg"
62-
}
63-
]
6454
, Jammy =
6555
[ { name =
6656
"${prefix}${capitalName
@@ -122,7 +112,6 @@ let dirtyWhen =
122112
-> merge
123113
{ Bookworm = minimalDirtyWhen
124114
, Bullseye = bullseyeDirtyWhen
125-
, Buster = minimalDirtyWhen
126115
, Jammy = minimalDirtyWhen
127116
, Focal = minimalDirtyWhen
128117
}

buildkite/src/Constants/DockerVersions.dhall

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ let Profiles = ./Profiles.dhall
22

33
let Docker
44
: Type
5-
= < Bookworm | Bullseye | Buster | Jammy | Focal >
5+
= < Bookworm | Bullseye | Jammy | Focal >
66

77
let capitalName =
88
\(docker : Docker)
99
-> merge
1010
{ Bookworm = "Bookworm"
1111
, Bullseye = "Bullseye"
12-
, Buster = "Buster"
1312
, Jammy = "Jammy"
1413
, Focal = "Focal"
1514
}
@@ -20,7 +19,6 @@ let lowerName =
2019
-> merge
2120
{ Bookworm = "bookworm"
2221
, Bullseye = "bullseye"
23-
, Buster = "buster"
2422
, Jammy = "jammy"
2523
, Focal = "focal"
2624
}
@@ -47,11 +45,6 @@ let dependsOn =
4745
, key = "${binary}-${lowerName docker}-${suffix}"
4846
}
4947
]
50-
, Buster =
51-
[ { name = "${prefix}${capitalName docker}${profileSuffix}"
52-
, key = "${binary}-${lowerName docker}-${suffix}"
53-
}
54-
]
5548
, Jammy =
5649
[ { name = "${prefix}${capitalName docker}${profileSuffix}"
5750
, key = "${binary}-${lowerName docker}-${suffix}"

buildkite/src/Constants/Toolchain.dhall

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ let runner =
1313
-> merge
1414
{ Bookworm = RunInToolchain.runInToolchainBookworm
1515
, Bullseye = RunInToolchain.runInToolchainBullseye
16-
, Buster = RunInToolchain.runInToolchainBuster
1716
, Jammy = RunInToolchain.runInToolchainBookworm
1817
, Focal = RunInToolchain.runInToolchainBullseye
1918
}
@@ -34,7 +33,6 @@ let image =
3433
-> merge
3534
{ Bookworm = ContainerImages.minaToolchainBookworm
3635
, Bullseye = ContainerImages.minaToolchainBullseye
37-
, Buster = ContainerImages.minaToolchainBuster
3836
, Jammy = ContainerImages.minaToolchainBookworm
3937
, Focal = ContainerImages.minaToolchainBullseye
4038
}

buildkite/src/Entrypoints/GenerateHardforkPackage.dhall

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let generate_hardfork_package =
3535
, Cmd.quietly
3636
"dhall-to-yaml --quoted <<< '(Pipeline.build (HardforkPackageGeneration.pipeline HardforkPackageGeneration.Spec::{=}).pipeline' | buildkite-agent pipeline upload"
3737
, Cmd.quietly
38-
"dhall-to-yaml --quoted <<< '(Pipeline.build (HardforkPackageGeneration.pipeline HardforkPackageGeneration.Spec::{codename = DebianVersions.DebVersion.Buster}).pipeline' | buildkite-agent pipeline upload"
38+
"dhall-to-yaml --quoted <<< '(Pipeline.build (HardforkPackageGeneration.pipeline HardforkPackageGeneration.Spec::{codename = DebianVersions.DebVersion.Bullseye}).pipeline' | buildkite-agent pipeline upload"
3939
]
4040
, label = "Generate hardfork package"
4141
, key = "generate-hardfork-package"

buildkite/src/Jobs/Promote/AutoPromoteNightly.dhall

+2-8
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ let promotePackages =
4242
, profile = Profiles.Type.Standard
4343
, network = Network.Type.Devnet
4444
, codenames =
45-
[ DebianVersions.DebVersion.Bullseye
46-
, DebianVersions.DebVersion.Focal
47-
, DebianVersions.DebVersion.Buster
48-
]
45+
[ DebianVersions.DebVersion.Bullseye, DebianVersions.DebVersion.Focal ]
4946
, from_channel = DebianChannel.Type.Unstable
5047
, to_channel = DebianChannel.Type.NightlyCompatible
5148
, new_tags =
@@ -69,10 +66,7 @@ let verifyPackages =
6966
, profile = Profiles.Type.Standard
7067
, network = Network.Type.Devnet
7168
, codenames =
72-
[ DebianVersions.DebVersion.Bullseye
73-
, DebianVersions.DebVersion.Focal
74-
, DebianVersions.DebVersion.Buster
75-
]
69+
[ DebianVersions.DebVersion.Bullseye, DebianVersions.DebVersion.Focal ]
7670
, channel = DebianChannel.Type.NightlyCompatible
7771
, new_tags =
7872
[ "latest-compatible-nightly"

buildkite/src/Jobs/Release/MinaArtifactBuster.dhall

-21
This file was deleted.

buildkite/src/Jobs/Release/MinaArtifactMainnetBuster.dhall

-35
This file was deleted.

buildkite/src/Jobs/Release/MinaToolchainArtifactBuster.dhall

-41
This file was deleted.

0 commit comments

Comments
 (0)