Skip to content

[VPEX][11] Default serverless target to v5#5962

Open
rugpanov wants to merge 1 commit into
dbconnect/11-cluster-namefrom
dbconnect/12-serverless-v5
Open

[VPEX][11] Default serverless target to v5#5962
rugpanov wants to merge 1 commit into
dbconnect/11-cluster-namefrom
dbconnect/12-serverless-v5

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

Stacked on #5961 (--cluster-name) → #5960#5959.

What

Per the [P0] CLI Changes spec, the serverless stand-in used when the source does not pin a version is now serverless-v5 (was v4).

Applies only to the fallback cases:

  • a serverless --job-id whose environment records no version, and
  • a bundle that records serverless without a version.

Explicitly passing --serverless-version <vN> is unaffected.

Changes

  • Introduce defaultServerlessVersion = "v5" in envkey.go, used at both fallback sites in target.go so the default lives in one place.
  • Update the two unit tests that assert the default.

No acceptance goldens change: all serverless acceptance tests pass --serverless-version v4 explicitly, so none exercise the default path.

Note

VS Code resolves the real serverless version itself and passes --serverless-version explicitly (spec §63), so this fallback is only hit when the version is genuinely unknown — but v5 is now the correct stand-in per spec.

This pull request and its description were written by Isaac.

@rugpanov rugpanov changed the title [VPEX] Default serverless target to v5 [VPEX][11] Default serverless target to v5 Jul 17, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 846170a

Run: 29584081473

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1122 5:06
💚​ aws windows 4 4 229 1120 8:52
💚​ aws-ucws linux 4 4 316 1038 7:19
💚​ aws-ucws windows 4 4 318 1036 10:06
💚​ azure linux 4 4 227 1121 5:11
💚​ azure windows 4 4 229 1119 6:47
💚​ azure-ucws linux 4 4 318 1035 7:39
💚​ azure-ucws windows 4 4 320 1033 8:17
💚​ gcp linux 4 4 226 1123 5:07
💚​ gcp windows 4 4 228 1121 6:46
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 10 slowest tests (at least 2 minutes):
duration env testname
8:48 aws-ucws windows TestAccept
8:26 aws windows TestAccept
6:43 azure-ucws windows TestAccept
6:21 azure windows TestAccept
6:18 gcp windows TestAccept
3:08 azure linux TestAccept
3:02 aws linux TestAccept
3:00 gcp linux TestAccept
2:52 aws-ucws linux TestAccept
2:50 azure-ucws linux TestAccept

Per the [P0] CLI Changes spec, the serverless stand-in used when the
source does not pin a version is now serverless-v5 (was v4). This applies
only to the fallback cases — a serverless job with no recorded version,
and a bundle that records 'serverless' without a version. Explicitly
passing --serverless-version is unaffected.

Introduce defaultServerlessVersion in envkey.go and use it at both
fallback sites so the default lives in one place. VS Code resolves the
real version itself and passes --serverless-version explicitly, so this
fallback applies only when the version is genuinely unknown.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the dbconnect/12-serverless-v5 branch from 179ea18 to 846170a Compare July 17, 2026 13:27

@anton-107 anton-107 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed as part of the full stack (#5960#5965). Consolidating the default into defaultServerlessVersion and using it at both fallback sites is the right move. Approving.

Two things to fold in:

  • [medium] The v5 default has no end-to-end coverage — and nothing verifies serverless-v5 is actually published. No acceptance test exercises the default-serverless path (unpinned serverless job / bundle-serverless), and no test server serves serverless/serverless-v5/pyproject.toml (only v3/v4 exist under acceptance/localenv/*/test.toml). The two unit tests that "cover" the default (target_test.go:100, :153) assert against "serverless/serverless-"+defaultServerlessVersion — i.e. they compare the code to the same constant it uses, so they'd pass for any value. Net: if serverless-v5 isn't yet a published key in the (not-yet-public) constraints repo, a real user hitting the default gets E_ENV_UNSUPPORTED at fetch and no test in the repo would catch it. Since "default to v5" is the whole point of this PR, an acceptance case that serves serverless-v5 and drives the default path would be valuable.

  • [low] Stale v4 comments left behind. This PR moved the default to v5 but two code comments still say v4: cmd/environments/compute.go:78 ("falls back to v4 in ResolveTarget") and :116 ("the v4 fallback …"), plus the acceptance comment acceptance/localenv/job-serverless-check/test.toml:7 ("rather than defaulting to v4"). A reader reasoning about the unpinned-job path is told v4 when it's now v5.

Reviewed with AI assistance (build + unit tests + adversarial verification against the checked-out top of stack).

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