Skip to content

Commit d68875f

Browse files
authored
Merge pull request #17166 from MinaProtocol/dkijania/use_mainnet_profile_when_building_mainnet
use mainnet profile in mainnet artifacts build
2 parents 7315523 + 3c8777f commit d68875f

32 files changed

+91
-33
lines changed

buildkite/src/Command/DockerImage.dhall

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ let ReleaseSpec =
5858
, deb_release = "\\\${MINA_DEB_RELEASE}"
5959
, deb_version = "\\\${MINA_DEB_VERSION}"
6060
, deb_legacy_version = "3.1.1-alpha1-compatible-14a8b92"
61-
, deb_profile = Profiles.Type.Standard
61+
, deb_profile = Profiles.Type.Devnet
6262
, build_flags = BuildFlags.Type.None
6363
, deb_repo = DebianRepo.Type.Local
6464
, docker_publish = DockerPublish.Type.Essential
@@ -71,10 +71,7 @@ let ReleaseSpec =
7171

7272
let stepKey =
7373
\(spec : ReleaseSpec.Type)
74-
-> "${Artifacts.lowerName
75-
spec.service}${Profiles.toLabelSegment
76-
spec.deb_profile}${BuildFlags.toLabelSegment
77-
spec.build_flags}${spec.step_key_suffix}"
74+
-> "${Artifacts.lowerName spec.service}${spec.step_key_suffix}"
7875

7976
let stepLabel =
8077
\(spec : ReleaseSpec.Type)

buildkite/src/Command/MinaArtifact.dhall

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let MinaBuildSpec =
6262
{ prefix = "MinaArtifact"
6363
, artifacts = Artifacts.AllButTests
6464
, debVersion = DebianVersions.DebVersion.Bullseye
65-
, profile = Profiles.Type.Standard
65+
, profile = Profiles.Type.Devnet
6666
, buildFlags = BuildFlags.Type.None
6767
, network = Network.Type.Berkeley
6868
, toolchainSelectMode = Toolchain.SelectionMode.ByDebian
@@ -93,12 +93,6 @@ let nameSuffix
9393
spec.profile}${BuildFlags.toSuffixUppercase
9494
spec.buildFlags}"
9595

96-
let keySuffix
97-
: MinaBuildSpec.Type -> Text
98-
= \(spec : MinaBuildSpec.Type)
99-
-> "${Profiles.toLabelSegment spec.profile}${BuildFlags.toLabelSegment
100-
spec.buildFlags}"
101-
10296
let build_artifacts
10397
: MinaBuildSpec.Type -> Command.Type
10498
= \(spec : MinaBuildSpec.Type)
@@ -324,5 +318,4 @@ in { pipeline = pipeline
324318
, onlyDebianPipeline = onlyDebianPipeline
325319
, MinaBuildSpec = MinaBuildSpec
326320
, labelSuffix = labelSuffix
327-
, keySuffix = keySuffix
328321
}

buildkite/src/Command/PatchArchiveTest.dhall

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
let Artifacts = ../Constants/Artifacts.dhall
22

3+
let BuildFlags = ../Constants/BuildFlags.dhall
4+
35
let Command = ./Base.dhall
46

57
let Size = ./Size.dhall
@@ -21,6 +23,7 @@ in { step =
2123
( Artifacts.fullDockerTag
2224
Artifacts.Tag::{
2325
, artifact = Artifacts.Type.FunctionalTestSuite
26+
, buildFlags = BuildFlags.Type.Instrumented
2427
}
2528
)
2629
"./scripts/patch-archive-test.sh && buildkite/scripts/upload-partial-coverage-data.sh ${key}"

buildkite/src/Command/ReplayerTest.dhall

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
let Artifacts = ../Constants/Artifacts.dhall
22

3+
let BuildFlags = ../Constants/BuildFlags.dhall
4+
35
let Command = ./Base.dhall
46

57
let Size = ./Size.dhall
@@ -19,6 +21,7 @@ in { step =
1921
( Artifacts.fullDockerTag
2022
Artifacts.Tag::{
2123
, artifact = Artifacts.Type.FunctionalTestSuite
24+
, buildFlags = BuildFlags.Type.Instrumented
2225
}
2326
)
2427
"./buildkite/scripts/replayer-test.sh && buildkite/scripts/upload-partial-coverage-data.sh ${key}"

buildkite/src/Constants/Artifacts.dhall

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ let Profiles = ./Profiles.dhall
66

77
let Network = ./Network.dhall
88

9+
let BuildFlags = ./BuildFlags.dhall
10+
911
let Repo = ./DockerRepo.dhall
1012

1113
let Artifact
@@ -157,12 +159,14 @@ let Tag =
157159
, version : Text
158160
, profile : Profiles.Type
159161
, network : Network.Type
162+
, buildFlags : BuildFlags.Type
160163
, remove_profile_from_name : Bool
161164
}
162165
, default =
163166
{ artifact = Artifact.Daemon
164167
, version = "\\\${MINA_DOCKER_TAG}"
165-
, profile = Profiles.Type.Standard
168+
, profile = Profiles.Type.Devnet
169+
, buildFlags = BuildFlags.Type.None
166170
, network = Network.Type.Berkeley
167171
, remove_profile_from_name = False
168172
}
@@ -177,20 +181,28 @@ let dockerTag =
177181

178182
else "${Profiles.toLabelSegment spec.profile}"
179183

184+
let build_flags_part =
185+
merge
186+
{ None = ""
187+
, Instrumented =
188+
"${BuildFlags.toLabelSegment spec.buildFlags}"
189+
}
190+
spec.buildFlags
191+
180192
in merge
181193
{ Daemon =
182194
"${spec.version}-${Network.lowerName
183-
spec.network}${profile_part}"
195+
spec.network}${profile_part}${build_flags_part}"
184196
, DaemonHardfork =
185197
"${spec.version}-${Network.lowerName
186198
spec.network}${profile_part}"
187-
, Archive = "${spec.version}"
199+
, Archive = "${spec.version}${build_flags_part}"
188200
, LogProc = "${spec.version}"
189201
, TestExecutive = "${spec.version}"
190202
, BatchTxn = "${spec.version}"
191203
, Rosetta = "${spec.version}-${Network.lowerName spec.network}"
192204
, ZkappTestTransaction = "${spec.version}"
193-
, FunctionalTestSuite = "${spec.version}"
205+
, FunctionalTestSuite = "${spec.version}${build_flags_part}"
194206
, Toolchain = "${spec.version}"
195207
}
196208
spec.artifact

buildkite/src/Constants/DebianVersions.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let DepsSpec =
4242
, default =
4343
{ deb_version = DebVersion.Bullseye
4444
, network = Network.Type.Berkeley
45-
, profile = Profiles.Type.Standard
45+
, profile = Profiles.Type.Devnet
4646
, build_flag = BuildFlags.Type.None
4747
, step = "build"
4848
, prefix = "MinaArtifact"

buildkite/src/Constants/DockerVersions.dhall

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ let Network = ./Network.dhall
66

77
let DebianVersions = ./DebianVersions.dhall
88

9+
let BuildFlags = ./BuildFlags.dhall
10+
911
let Docker
1012
: Type
1113
= < Bookworm | Bullseye | Jammy | Focal | Noble >
@@ -39,14 +41,16 @@ let DepsSpec =
3941
, network : Network.Type
4042
, profile : Profiles.Type
4143
, artifact : Artifacts.Type
44+
, buildFlags : BuildFlags.Type
4245
, suffix : Text
4346
}
4447
, default =
4548
{ codename = Docker.Bullseye
4649
, prefix = "MinaArtifact"
4750
, network = Network.Type.Berkeley
48-
, profile = Profiles.Type.Standard
51+
, profile = Profiles.Type.Devnet
4952
, artifact = Artifacts.Type.Daemon
53+
, buildFlags = BuildFlags.Type.None
5054
, suffix = "docker-image"
5155
}
5256
}
@@ -59,9 +63,17 @@ let dependsOn =
5963

6064
let key = "${Artifacts.lowerName spec.artifact}-${spec.suffix}"
6165

66+
let buildFlagSuffix =
67+
merge
68+
{ None = ""
69+
, Instrumented =
70+
"${BuildFlags.toSuffixUppercase spec.buildFlags}"
71+
}
72+
spec.buildFlags
73+
6274
in [ { name =
6375
"${spec.prefix}${capitalName
64-
spec.codename}${network}${profileSuffix}"
76+
spec.codename}${network}${profileSuffix}${buildFlagSuffix}"
6577
, key = key
6678
}
6779
]

buildkite/src/Constants/Profiles.dhall

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
let Network = ./Network.dhall
2+
13
let Profile
24
: Type
3-
= < Standard | Mainnet | Lightnet | Dev >
5+
= < Devnet | Mainnet | Lightnet | Dev >
46

57
let capitalName =
68
\(profile : Profile)
79
-> merge
8-
{ Standard = "Standard"
10+
{ Devnet = "Devnet"
911
, Mainnet = "Mainnet"
1012
, Lightnet = "Lightnet"
1113
, Dev = "Dev"
@@ -15,7 +17,7 @@ let capitalName =
1517
let lowerName =
1618
\(profile : Profile)
1719
-> merge
18-
{ Standard = "standard"
20+
{ Devnet = "devnet"
1921
, Mainnet = "mainnet"
2022
, Lightnet = "lightnet"
2123
, Dev = "dev"
@@ -25,17 +27,28 @@ let lowerName =
2527
let duneProfile =
2628
\(profile : Profile)
2729
-> merge
28-
{ Standard = "devnet"
30+
{ Devnet = "devnet"
2931
, Mainnet = "mainnet"
3032
, Lightnet = "lightnet"
3133
, Dev = "dev"
3234
}
3335
profile
3436

37+
let fromNetwork =
38+
\(network : Network.Type)
39+
-> merge
40+
{ Devnet = Profile.Devnet
41+
, Mainnet = Profile.Mainnet
42+
, Berkeley = Profile.Devnet
43+
, DevnetLegacy = Profile.Devnet
44+
, MainnetLegacy = Profile.Mainnet
45+
}
46+
network
47+
3548
let toSuffixUppercase =
3649
\(profile : Profile)
3750
-> merge
38-
{ Standard = ""
51+
{ Devnet = "Devnet"
3952
, Mainnet = "Mainnet"
4053
, Lightnet = "Lightnet"
4154
, Dev = "Dev"
@@ -45,7 +58,7 @@ let toSuffixUppercase =
4558
let toSuffixLowercase =
4659
\(profile : Profile)
4760
-> merge
48-
{ Standard = ""
61+
{ Devnet = "devnet"
4962
, Mainnet = "mainnet"
5063
, Lightnet = "lightnet"
5164
, Dev = "dev"
@@ -55,7 +68,7 @@ let toSuffixLowercase =
5568
let toLabelSegment =
5669
\(profile : Profile)
5770
-> merge
58-
{ Standard = ""
71+
{ Devnet = "devnet"
5972
, Mainnet = "-mainnet"
6073
, Lightnet = "-lightnet"
6174
, Dev = "-dev"
@@ -67,6 +80,7 @@ in { Type = Profile
6780
, lowerName = lowerName
6881
, duneProfile = duneProfile
6982
, toSuffixUppercase = toSuffixUppercase
83+
, fromNetwork = fromNetwork
7084
, toSuffixLowercase = toSuffixLowercase
7185
, toLabelSegment = toLabelSegment
7286
}

buildkite/src/Jobs/Promote/AutoPromoteNightly.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ in Pipeline.build
6565
, Artifacts.Type.Archive
6666
, Artifacts.Type.Rosetta
6767
]
68-
, profile = Profiles.Type.Standard
68+
, profile = Profiles.Type.Devnet
6969
, networks = [ Network.Type.Devnet ]
7070
, codenames =
7171
[ DebianVersions.DebVersion.Bullseye

0 commit comments

Comments
 (0)