From c57b860c153b04a568bb0dbc0de8179bbff19761 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Fri, 3 Nov 2023 16:26:35 -0400 Subject: [PATCH] main.star: prepend CIPD epoch to wasmtime, wazero versions The wazero and wasmtime packages are available in infra/3pp/tools as of crrev.com/c/4995549. In preparation of the switch soon to be done in crrev.com/c/4995558, prepend the "2@" package epoch (more context in crrev.com/c/2763964) that their version strings ended up with. Also factor out the comment explaining how to check the availability of a given version in CIPD, so we don't need to repeat it 3 times. For golang/go#61116. For golang/go#61117. Change-Id: I1c638aec1782b8d4f15724c0acc97f0323e5f70a Reviewed-on: https://go-review.googlesource.com/c/build/+/539715 TryBot-Bypass: Dmitri Shuralyov TryBot-Bypass: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov Reviewed-by: Michael Knyszek --- generated/cr-buildbucket.cfg | 36 ++++++++++++++++++------------------ main.star | 17 ++++++++--------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/generated/cr-buildbucket.cfg b/generated/cr-buildbucket.cfg index a68b710809..2de3de336e 100644 --- a/generated/cr-buildbucket.cfg +++ b/generated/cr-buildbucket.cfg @@ -5605,7 +5605,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' caches { name: "git" @@ -5651,7 +5651,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' caches { name: "git" @@ -77357,7 +77357,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" caches { @@ -77403,7 +77403,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" @@ -77446,7 +77446,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" caches { @@ -77492,7 +77492,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" @@ -85024,7 +85024,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' caches { name: "git" @@ -85070,7 +85070,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' caches { name: "git" @@ -92805,7 +92805,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" caches { @@ -92851,7 +92851,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" @@ -92894,7 +92894,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" caches { @@ -92940,7 +92940,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" @@ -97136,7 +97136,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' caches { name: "git" @@ -97182,7 +97182,7 @@ buckets { ' "mode": 1,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' caches { name: "git" @@ -189908,7 +189908,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" caches { @@ -189954,7 +189954,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wasmtime_version": "14.0.4"' + ' "wasmtime_version": "2@14.0.4"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" @@ -189997,7 +189997,7 @@ buckets { ' "mode": 2,' ' "project": "go",' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" caches { @@ -190043,7 +190043,7 @@ buckets { ' "shard_id": 0' ' },' ' "tools_cache": "tools",' - ' "wazero_version": "1.5.0"' + ' "wazero_version": "2@1.5.0"' '}' allowed_property_overrides: "go_commit" allowed_property_overrides: "test_shard" diff --git a/main.star b/main.star index 9e55f9cb6a..3fc73264fa 100755 --- a/main.star +++ b/main.star @@ -600,6 +600,10 @@ def define_builder(env, project, go_branch_short, builder_type): # We run GOARCH=wasm builds on linux/amd64 with GOOS/GOARCH set, # and the applicable Wasm runtime provided as a CIPD dependency. # + # The availability of a given version in CIPD can be checked with: + # cipd search infra/3pp/tools/{wasm_runtime}/linux-amd64 -tag=version:{version} + # Where wasm_runtime is one of nodejs, wasmtime, wazero. + # # TODO(dmitshur): We have target_go{os,arch} and by default they would be set to js/wasm. # However, they're currently only for the coordinator, not build-go and test-only builders, # so I can't use them as is. Perhaps we'll consider changing that, and then there won't be @@ -610,21 +614,16 @@ def define_builder(env, project, go_branch_short, builder_type): if os == "js": if suffix != "": fail("unknown GOOS=js builder suffix: %s" % suffix) - node_versions = { - # Confirm that version is available with: cipd search infra/3pp/tools/nodejs/linux-amd64 -tag=version:{node_version} - 18: "2@18.8.0", - 13: "13.2.0", - } - base_props["node_version"] = node_versions[18] + base_props["node_version"] = "2@18.8.0" if go_branch_short == "go1.20": - base_props["node_version"] = node_versions[13] + base_props["node_version"] = "13.2.0" elif os == "wasip1": if suffix == "wasmtime": base_props["env"]["GOWASIRUNTIME"] = "wasmtime" - base_props["wasmtime_version"] = "14.0.4" + base_props["wasmtime_version"] = "2@14.0.4" elif suffix == "wazero": base_props["env"]["GOWASIRUNTIME"] = "wazero" - base_props["wazero_version"] = "1.5.0" + base_props["wazero_version"] = "2@1.5.0" else: fail("unknown GOOS=wasip1 builder suffix: %s" % suffix)