Skip to content

internal: Bump test-engine-client to v2.5.1 and unify bktec call sites#3925

Merged
gchan merged 3 commits into
mainfrom
te-5842-bump-bktec-and-unify-call-sites
May 15, 2026
Merged

internal: Bump test-engine-client to v2.5.1 and unify bktec call sites#3925
gchan merged 3 commits into
mainfrom
te-5842-bump-bktec-and-unify-call-sites

Conversation

@gchan
Copy link
Copy Markdown
Contributor

@gchan gchan commented May 14, 2026

Description

This repo currently calls bktec from two places at two different versions: .buildkite/steps/tests.sh uses go tool test-engine-client at v1.6.0 (pinned in go.mod), and .buildkite/steps/collect-commit-metadata.sh (added in #3924) downloads the v2.5.0 binary from the GitHub release at step time. v1.6.0 predates the plan subcommand and the --collect-git-metadata flag, which is why the metadata step had to bring its own bktec.

This PR unifies both call sites onto a single go tool test-engine-client install pinned in go.mod, dropping the curl bootstrap and the runtime dependency on GitHub releases.

bktec v2.0.0 split the previous bare-command shape into run / plan / tools subcommands, so the runtime test path migrates from go tool test-engine-client to go tool test-engine-client run at the same time.

Changes

Best reviewed commit-by-commit:

  • Bump test-engine-client from v1.6.0 to v2.5.1 in go.mod.
  • Migrate tests.sh to the v2 run subcommand shape.
  • Switch the metadata step to go tool test-engine-client plan so both call sites share the same install.

Verification

  • test-linux-amd64, test-linux-arm64, test-windows, and test-race-linux-arm64 keep passing and continue to emit the same junit-* artifacts.
  • The metadata step keeps emitting Plan request issued -- git commit metadata sent to Test Engine.

Deployment

Low risk. The runtime test contract is unchanged (same suite slug, runner, result path, retry count, test command -- only the entry-point shape moves from v1 to v2). The metadata step is soft_fail: true so any regression on that path doesn't block the build.

Rollback

Yes -- revert the PR.

Base automatically changed from te-5828-bktec-plan-collect-commit-metadata to main May 14, 2026 23:37
@gchan gchan added the internal Non-user facing, internal change. label May 15, 2026
@gchan
Copy link
Copy Markdown
Contributor Author

gchan commented May 15, 2026

This PR is waiting on a 2.5.1 release which addresses Go's module versioning rules

@gchan gchan force-pushed the te-5842-bump-bktec-and-unify-call-sites branch from 09b549e to 1c3267f Compare May 15, 2026 03:12
gchan added 3 commits May 15, 2026 15:16
Move the `go tool test-engine-client` install from the v1 major to v2.x
so the runtime test path can share a bktec version with the metadata
side-channel landed in TE-5828.

v1.6.0 (Jun 2025) predates the v2.0.0 subcommand split (Dec 2025), the
`plan` subcommand, and the `--collect-git-metadata` flag added in
v2.4.0. v2.5.1 also carries the corrected go.mod module path with the
`/v2` suffix required for v2+ module fetches.

`go mod tidy` adds `github.com/urfave/cli/v3 v3.8.0` as a new
indirect (bktec's own CLI dependency) and prunes the v1.x-only
transitives no longer pulled in (pact-go, cobra, pflag, afero,
logutils, mousetrap).

Subsequent commits migrate `tests.sh` to the v2 `run` subcommand
shape and unify the metadata script onto the same `go tool` install.
bktec v2.0.0 split the single-command shape into `run`, `plan`, and
`tools` subcommands. The bare `bktec` invocation is no longer
supported -- the v2 CLI exits non-zero on an unrecognised command.

The runtime test contract is unchanged: same suite slug, runner,
result path, retry count, and test command. Only the entry point
shape moves from v1 to v2.
Drop the curl-and-run install bootstrap and call the bktec binary
installed via `go tool` instead. Both call sites in this repo now
share a single bktec version pinned in go.mod, removing the runtime
dependency on the GitHub release endpoint and the ~5s download from
the metadata step's wall clock.

The metadata step already runs inside the `agent` compose service
(see .buildkite/docker-compose.yml), which carries `go` on PATH for
bktec's gotest runner -- `go tool` resolves and caches the bktec
binary out of GOMODCACHE on the same code path the test step uses.

No change to the plan request shape: same suite, same runner, same
`--collect-git-metadata` preview flag, same discarded JSON output.

Also drops the `BKTEC_VERSION` override env, the arch detection
case, and the tempdir / chmod / PATH plumbing -- all of that is now
handled by the Go module pin.
@gchan gchan force-pushed the te-5842-bump-bktec-and-unify-call-sites branch from 1c3267f to 58f25e2 Compare May 15, 2026 03:17
@gchan gchan requested a review from buildkate May 15, 2026 03:24
@gchan gchan marked this pull request as ready for review May 15, 2026 03:24
@gchan gchan requested review from a team as code owners May 15, 2026 03:24
@gchan gchan enabled auto-merge May 15, 2026 03:31
@gchan gchan merged commit 4518586 into main May 15, 2026
4 checks passed
@gchan gchan deleted the te-5842-bump-bktec-and-unify-call-sites branch May 15, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Non-user facing, internal change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants