Skip to content

acc: download old CLI versions in parallel - #6943

Merged
Sankalp-Mittal merged 1 commit into
mainfrom
sankalp-mittal/parallel-old-cli-download
Oct 6, 2026
Merged

Sankalp-Mittal merged 1 commit into
mainfrom
sankalp-mittal/parallel-old-cli-download

Conversation

@Sankalp-Mittal

Copy link
Copy Markdown
Contributor

Changes

  • The acceptance harness now downloads the three old CLI releases (0.293.0, 1.8.0, 1.16.1) concurrently with an errgroup. The downloads start as soon as the build dir is known, so they overlap with the terraform, wheel, and CLI builds. The harness waits for them where CLI_293 / CLI_1_8 / CLI_1_16_1 are set.
  • downloadCLI, downloadToFile, and extractFileFromZip now return errors instead of calling require, because t.FailNow must only be called from the test goroutine. DownloadCLI(t, ...) stays as a thin require wrapper for the -useversion path.
  • The -useversion path waits for the background downloads before it starts its own, so the same version never gets downloaded twice at once (e.g. -useversion 1.8.0).

Why

On a cold cache (fresh worktree or CI), the three downloads ran one after another and blocked test startup.

Tests

  • Cold cache: deleted the three version dirs (CLI build kept cached) and ran go test -count=1 ./acceptance -run 'TestAccept/selftest/basic$'. Before: 12.0s / 8.5s. After: 4.8s / 4.2s.
  • Fresh worktree: bundle/hashing/old-cli-on-new-state, bundle/state/feature_flags/accept_old, bundle/invariant/continue_293, and selftest/basic pass.
  • -useversion 1.8.0 with that version's dir removed passes.

This pull request and its description were written by Isaac.

The acceptance harness downloads three released CLIs (0.293.0, 1.8.0,
1.16.1) one after another. Start them concurrently right after the build
dir is known so they overlap with the terraform/wheel/CLI builds, and wait
for them where the env vars are set.

The download helpers now return errors instead of calling require, since
t.FailNow must only be called from the test goroutine. DownloadCLI stays
as a thin require wrapper for the -useversion path, which waits for the
background downloads first so the same version is never downloaded twice
at once.

Co-authored-by: Isaac <no-reply@databricks.com>
@Sankalp-Mittal
Sankalp-Mittal requested a review from a team as a code owner October 6, 2026 11:41
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: dca7b75

Run: 37458304928

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 16 5:40
✅​ aws windows 278 14 7:05
✅​ azure linux 275 16 6:05
✅​ azure windows 277 14 7:05
✅​ gcp linux 276 16 5:30
✅​ gcp windows 278 14 7:38
Top 6 slowest tests (at least 2 minutes):
duration env testname
7:35 gcp windows TestAccept
7:03 aws windows TestAccept
7:02 azure windows TestAccept
4:09 gcp linux TestAccept
4:05 aws linux TestAccept
4:00 azure linux TestAccept

@Sankalp-Mittal
Sankalp-Mittal added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 6571f2a Oct 6, 2026
25 checks passed
@Sankalp-Mittal
Sankalp-Mittal deleted the sankalp-mittal/parallel-old-cli-download branch October 6, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants