Skip to content

acc: record mismatched wheel uploads in artifacts/whl_dynamic_readplan - #8156

Open
denik wants to merge 6 commits into
mainfrom
denik/acc-record-readplan-dynamic-wheels
Open

denik wants to merge 6 commits into
mainfrom
denik/acc-record-readplan-dynamic-wheels

Conversation

@denik

@denik denik commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

New acceptance test bundle/artifacts/whl_dynamic_readplan: a dynamic_version wheel artifact with a build command, deployed with bundle deploy --plan. After two version bumps, dist/ holds the 0.0.1, 0.0.2 and 0.0.3 wheels and a second package, other_test_code. The test then applies a new saved plan. A second task, pinned, names the old 0.0.1 wheel by its exact path, and nothing references 0.0.2. The output records that the job references

.../artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS][1]-py3-none-any.whl
.../artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl
.../artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl   (pinned task)

while the deploy uploads

.../artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl
.../artifacts/.internal/my_test_code-0.0.2-py3-none-any.whl
.../artifacts/.internal/my_test_code-0.0.3-py3-none-any.whl
.../artifacts/.internal/other_test_code-0.0.1-py3-none-any.whl

Why

Applying a saved plan skips Build, so LocalLibraryPaths expands the globs itself. It patches only the first wheel each artifact glob matches (break), and unlike ExpandGlobReferences it does not keep only the latest version. The deploy reports success, but the job points at wheels that were never uploaded, and the old version's code is uploaded in their place. Badness in test.toml says what is wrong. The fix is stacked on top in #8157.

Tests

New small test with two variants, DMS off and on. Each takes about 2s. It is under bundle/artifacts so it gets that directory's virtualenv with setuptools. A fixed mtime on the copied wheel (setmtime.py) keeps its patched version stable, and a [[Repls]] entry masks the synced-file count, because it depends on build leftovers. The existing readplan/whl-upload test uses a prebuilt wheel with no build command, and in that case the glob is already expanded before this code, so it can't show the bug. I kept this separate from whl_dynamic: that test runs four variants (DMS by READPLAN) and also records plain deploy, so this setup would run four times there and change most of its output.

Gaps and risks

  • Local only, against the testserver. There is no cloud run, because the bug is in which local files the CLI picks to upload, not in backend behavior.
  • The test copies its package and the extra wheel from the sibling tests whl_explicit and whl_prebuilt_multiple, as the other tests in this folder do. A change to those inputs changes this test too.
  • Risk: low (test-only).

This PR was created by analyzing coverage gaps.
Coverage: http://go/cli/dashboard/coverage/file/bundle/libraries/remote_path.go (LocalLibraryPaths, lines 25-87).

🤖 AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

With dynamic_version and a build command, deploy --plan patches only the
first wheel each artifact glob matches and doesn't keep only the latest
version. After a version bump it uploads the patched old wheel and the
unpatched new ones, while the job references patched wheels that are never
uploaded.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code. labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 3c86b8e38 | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

2 tests: regression=0 unreleased=0 coverage=2 failing=0
test branch main (905b0f7) latest (v1.28.0)
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=true/READPLAN=1 ✅ ✅ ✅

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 3c86b8e

Run: 46096317831

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 173 18 3:40
💚​ aws-windows-latest-4core-16gb 1 173 18 2:48
💚​ azure linux-2core-8gb 1 172 18 4:03
💚​ azure-windows-latest-4core-16gb 1 172 18 2:52
💚​ gcp linux-2core-8gb 1 173 18 4:21
💚​ gcp-windows-latest-4core-16gb 1 173 18 2:57
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:02 gcp linux-2core-8gb TestAccept
3:58 azure linux-2core-8gb TestAccept
3:20 aws linux-2core-8gb TestAccept
2:55 gcp-windows-latest-4core-16gb TestAccept
2:51 azure-windows-latest-4core-16gb TestAccept
2:46 aws-windows-latest-4core-16gb TestAccept

Co-authored-by: Isaac <no-reply@databricks.com>
denik and others added 3 commits November 28, 2026 01:28
A task that names the old build by its exact path references it
unpatched, but deploy --plan uploads only the patched copy.

Co-authored-by: Isaac <no-reply@databricks.com>
Also run both DMS variants and use the stateful jobs/reset handler
instead of a stub.

Co-authored-by: Isaac <no-reply@databricks.com>
With the pinned task naming 0.0.1, a 0.0.2 build that nothing
references is what shows that only the latest version is uploaded.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik marked this pull request as ready for review November 28, 2026 02:24
@denik
denik requested review from a team as code owners November 28, 2026 02:24

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 3c86b8e. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) and 1 question(s) below.

This PR adds the whl_dynamic_readplan acceptance test. It records, under Badness, that deploy --plan with a glob over several built wheels uploads different wheels than the job references. The golden output matches the bug the description explains. I found no correctness problems in the test itself. The two findings are small: a grep -v filter that the testing rules say to avoid, and a terse comment in test.toml. There is also one question about whether this belongs in an existing directory.

Questions

  1. whl_dynamic already runs a dynamic_version artifact with a build command and a dist/*.whl glob through deploy $(readplanarg ...) with READPLAN = ["", "1"]. The testing rules ask to extend an existing directory when coverage overlaps. Did you keep this separate because the buggy --plan output would diverge from plain deploy across that matrix, or could the multi-wheel step go into whl_dynamic (or whl_change_version) once #8157 makes the variants agree? (non-blocking)

@Sankalp-Mittal Sankalp-Mittal 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.

[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Opus 5.5 + Claude Sonnet 5.5, cross-verified). Only points the reviewers agreed on are posted.

No blocking or major issues found.

The script passes --plan itself, and no runner code reads READPLAN.
Mask the synced file count instead of dropping the Files line.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik

denik commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

🤖 On the review's question about folding this into whl_dynamic or whl_change_version: I kept it separate. whl_dynamic runs four variants (DMS by READPLAN) and records plain deploy as well. This setup (three versions, a second package and a pinned task) would run four times there and change most of its output. whl_dynamic_readplan has two variants at about 2s each. Once #8157 lands the plain and --plan outputs agree, so merging them later is possible. I've noted this in the description.

AI agent (opus5.5, isaac_claude)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues factory-generated test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants