Skip to content

Commit 4518586

Browse files
authored
Merge pull request #3925 from buildkite/te-5842-bump-bktec-and-unify-call-sites
internal: Bump test-engine-client to v2.5.1 and unify bktec call sites
2 parents e793ea8 + 58f25e2 commit 4518586

4 files changed

Lines changed: 15 additions & 47 deletions

File tree

.buildkite/steps/collect-commit-metadata.sh

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,23 @@
1313
#
1414
# Runs inside the `agent` docker-compose service (see
1515
# .buildkite/docker-compose.yml), which is a linux/amd64+arm64 golang image.
16-
# The service provides `go` on PATH for bktec's gotest runner (which shells
17-
# out to `go list ./...` to discover packages) and forwards
18-
# BUILDKITE_TEST_ENGINE_API_ACCESS_TOKEN into the container.
16+
# The service provides `go` on PATH so we can install bktec via `go tool`,
17+
# and forwards BUILDKITE_TEST_ENGINE_API_ACCESS_TOKEN into the container.
1918
#
20-
# bktec is downloaded fresh each run from the test-engine-client GitHub
21-
# release. The agent repo's go.mod pins test-engine-client v1.6.0 for use as
22-
# a `go tool` on the runtime test path; that v1 shape predates the `plan`
23-
# subcommand and is intentionally left untouched here. A future change should
24-
# unify both call sites on a single bktec version.
19+
# bktec is pinned via go.mod and installed as a `go tool`, sharing the install
20+
# path with `.buildkite/steps/tests.sh`. See TE-5842 for the unification.
2521

2622
set -euo pipefail
2723

28-
BKTEC_VERSION="${BKTEC_VERSION:-2.5.0}"
29-
30-
echo "+++ :test_tube: Installing bktec v${BKTEC_VERSION}"
31-
32-
case "$(uname -m)" in
33-
x86_64) arch=amd64 ;;
34-
aarch64|arm64) arch=arm64 ;;
35-
*)
36-
echo "Unsupported architecture: $(uname -m)" >&2
37-
exit 1
38-
;;
39-
esac
40-
41-
bindir="$(mktemp -d)"
42-
url="https://github.com/buildkite/test-engine-client/releases/download/v${BKTEC_VERSION}/bktec_${BKTEC_VERSION}_linux_${arch}"
43-
44-
curl --fail --silent --show-error --location --output "${bindir}/bktec" "${url}"
45-
chmod +x "${bindir}/bktec"
46-
export PATH="${bindir}:${PATH}"
47-
48-
bktec --version
24+
echo "+++ :test_tube: bktec version"
25+
go tool test-engine-client --version
4926

5027
echo "+++ :test_tube: Collecting git commit metadata via bktec plan (discarded)"
5128

5229
# bktec needs a writable RESULT_PATH for plan output config validation. The
5330
# --json output is redirected to /dev/null below so this file is never read.
5431
export BUILDKITE_TEST_ENGINE_RESULT_PATH=/tmp/bktec-plan-metadata.json
5532

56-
BKTEC_PREVIEW_SELECTION=1 bktec plan --json --collect-git-metadata > /dev/null
33+
BKTEC_PREVIEW_SELECTION=1 go tool test-engine-client plan --json --collect-git-metadata > /dev/null
5734

5835
echo "Plan request issued -- git commit metadata sent to Test Engine."

.buildkite/steps/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ else
2323
export BUILDKITE_TEST_ENGINE_TEST_CMD="go tool gotestsum --junitfile={{resultPath}} -- -count=1 -cover $* {{packages}} -test.gocoverdir=${COVERAGE_DIR}"
2424
fi
2525

26-
go tool test-engine-client
26+
go tool test-engine-client run

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ require (
123123
github.com/beorn7/perks v1.0.1 // indirect
124124
github.com/bitfield/gotestdox v0.2.2 // indirect
125125
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
126-
github.com/buildkite/test-engine-client v1.6.0 // indirect
126+
github.com/buildkite/test-engine-client/v2 v2.5.1 // indirect
127127
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
128128
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
129129
github.com/cespare/xxhash/v2 v2.3.0 // indirect
@@ -190,6 +190,7 @@ require (
190190
github.com/tklauser/go-sysconf v0.3.16 // indirect
191191
github.com/tklauser/numcpus v0.11.0 // indirect
192192
github.com/trailofbits/go-mutexasserts v0.0.0-20250514102930-c1f3d2e37561 // indirect
193+
github.com/urfave/cli/v3 v3.8.0 // indirect
193194
github.com/vektah/gqlparser/v2 v2.5.32 // indirect
194195
github.com/wolfeidau/quickzip v1.0.2 // indirect
195196
github.com/yusufpapurcu/wmi v1.2.4 // indirect
@@ -227,7 +228,7 @@ require (
227228
tool (
228229
drjosh.dev/assertzapper
229230
github.com/Khan/genqlient/generate
230-
github.com/buildkite/test-engine-client
231+
github.com/buildkite/test-engine-client/v2
231232
gotest.tools/gotestsum
232233
mvdan.cc/gofumpt
233234
)

go.sum

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ github.com/buildkite/roko v1.4.0 h1:DxixoCdpNqxu4/1lXrXbfsKbJSd7r1qoxtef/TT2J80=
164164
github.com/buildkite/roko v1.4.0/go.mod h1:0vbODqUFEcVf4v2xVXRfZZRsqJVsCCHTG/TBRByGK4E=
165165
github.com/buildkite/shellwords v1.0.1 h1:88OjMbEBf+EliVB0tizXJynpAM2CKOvYwepg5n8O70M=
166166
github.com/buildkite/shellwords v1.0.1/go.mod h1:so0eQnTxgbo58CTYX+4BCx5UuMzvRha9dcKdCKl6NV4=
167-
github.com/buildkite/test-engine-client v1.6.0 h1:yk/gdkFFU8B1+M16mxPNmxJgVoYffI/sx4XP1xmFesE=
168-
github.com/buildkite/test-engine-client v1.6.0/go.mod h1:J6LrqenaJPfVCffiWW1/QxjICFb+OkqCvdCd7qAI0AE=
167+
github.com/buildkite/test-engine-client/v2 v2.5.1 h1:2Bx+UxKxsbyVB4pixuUMeevvoATrfYO7DKUpg3iI3jc=
168+
github.com/buildkite/test-engine-client/v2 v2.5.1/go.mod h1:JA61MSQxGU9GYx0CyED17ex83RSzcKI3LR3RVyuaH7M=
169169
github.com/buildkite/zstash v0.8.0 h1:z8hBGGKIaN/UX0MZh51P8s28mWaDBkgD3uMoOu6Q96g=
170170
github.com/buildkite/zstash v0.8.0/go.mod h1:60v4pl8PnsVA6b09MC47aTR8Z1QNJoeQqOGp2jkEww8=
171171
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
@@ -272,10 +272,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz
272272
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c=
273273
github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA=
274274
github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
275-
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
276-
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
277-
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
278-
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
279275
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
280276
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
281277
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
@@ -337,8 +333,6 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
337333
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
338334
github.com/outcaste-io/ristretto v0.2.3 h1:AK4zt/fJ76kjlYObOeNwh4T3asEuaCmp26pOvUOL9w0=
339335
github.com/outcaste-io/ristretto v0.2.3/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac=
340-
github.com/pact-foundation/pact-go/v2 v2.4.1 h1:eaLC58qzeCTbwdlCY8UvWz1HmDW+qrjTFfH8Xoq0rWs=
341-
github.com/pact-foundation/pact-go/v2 v2.4.1/go.mod h1:OwnXXRliPZvKDMJn/IsAwQ95tQprmp5gPTzPYz54mTg=
342336
github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=
343337
github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
344338
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
@@ -396,12 +390,6 @@ github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUN
396390
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
397391
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
398392
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
399-
github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
400-
github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
401-
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
402-
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
403-
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
404-
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
405393
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
406394
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
407395
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -428,6 +416,8 @@ github.com/trailofbits/go-mutexasserts v0.0.0-20250514102930-c1f3d2e37561 h1:qqa
428416
github.com/trailofbits/go-mutexasserts v0.0.0-20250514102930-c1f3d2e37561/go.mod h1:GA3+Mq3kt3tYAfM0WZCu7ofy+GW9PuGysHfhr+6JX7s=
429417
github.com/urfave/cli v1.22.17 h1:SYzXoiPfQjHBbkYxbew5prZHS1TOLT3ierW8SYLqtVQ=
430418
github.com/urfave/cli v1.22.17/go.mod h1:b0ht0aqgH/6pBYzzxURyrM4xXNgsoT/n2ZzwQiEhNVo=
419+
github.com/urfave/cli/v3 v3.8.0 h1:XqKPrm0q4P0q5JpoclYoCAv0/MIvH/jZ2umzuf8pNTI=
420+
github.com/urfave/cli/v3 v3.8.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
431421
github.com/vektah/gqlparser/v2 v2.5.32 h1:k9QPJd4sEDTL+qB4ncPLflqTJ3MmjB9SrVzJrawpFSc=
432422
github.com/vektah/gqlparser/v2 v2.5.32/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts=
433423
github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI=

0 commit comments

Comments
 (0)