Skip to content

acc: record deleted patched wheel in artifacts/whl_dynamic_same_distribution - #8026

Merged
denik merged 1 commit into
mainfrom
denik/acc-record-patched-wheel-cleanup
Nov 26, 2026
Merged

denik merged 1 commit into
mainfrom
denik/acc-record-patched-wheel-cleanup

Conversation

@denik

@denik denik commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Adds the acceptance test bundle/artifacts/whl_dynamic_same_distribution. It deploys a dynamic_version wheel artifact with two wheels of the same package that differ only in the python tag (py3 and py310), each used by its own job task. The output records how bundle deploy currently fails:

Error: unable to open [TEST_TMP_DIR]/.databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+1577836800000000000-py3-none-any.whl: no such file or directory

Why

makePatchedWheel empties patched_wheels/<artifact>_<distribution> before it patches each file. Both wheels share that directory, so patching the second one deletes the first. The upload then fails. By that point artifacts.CleanUp has already emptied the remote .internal directory, so jobs from the previous deploy also lose their wheel. Badness in test.toml says what is wrong and what is right. The fix is stacked on top in #8027.

Tests

This is a new small test. It runs in both DMS variants, inherited from the bundle tests, with plain bundle deploy. Runtime is about 1.5s per variant. Fixed UTC mtimes on the two copies keep the patched names distinct and stable. The test prints the wheel each job task references and the cache contents after the deploy. The fix in #8027 adds a deploy --plan variant. It can't be recorded here: in the default sync mode, deploy --plan re-patches missing wheels while it collects libraries, which hides this bug.

I added a new test instead of extending one: no existing test has two wheels of one package in one artifact, and adding the case to whl_dynamic would run it once per variant of that test's 4-variant matrix.

This PR was created by analyzing coverage gaps.
Coverage: http://go/cli/dashboard/coverage/file/bundle/artifacts/build.go (makePatchedWheel, lines 129-161).

AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

@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 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 0123c10a8 | Workflow run

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

2 tests: regression=0 unreleased=0 coverage=2 failing=0
test branch main (5b9a0b6) latest (v1.28.0)
TestAccept/bundle/artifacts/whl_dynamic_same_distribution/DMS= ✅ ✅ ✅
TestAccept/bundle/artifacts/whl_dynamic_same_distribution/DMS=true ✅ ✅ ✅

@denik
denik force-pushed the denik/acc-record-patched-wheel-cleanup branch from b85d59d to fd5dd85 Compare November 26, 2026 00:31
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 0123c10

Run: 45753955213

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 279 20 3:45
💚​ aws-windows-latest-4core-16gb 1 281 18 3:44
💚​ azure linux-2core-8gb 1 278 20 3:48
💚​ azure-windows-latest-4core-16gb 1 280 18 3:47
💚​ gcp linux-2core-8gb 1 279 20 3:51
💚​ gcp-windows-latest-4core-16gb 1 281 18 4:15
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 3 slowest tests (at least 2 minutes):
duration env testname
4:12 gcp-windows-latest-4core-16gb TestAccept
3:44 azure-windows-latest-4core-16gb TestAccept
3:41 aws-windows-latest-4core-16gb TestAccept

@denik
denik force-pushed the denik/acc-record-patched-wheel-cleanup branch from fd5dd85 to bbbecb0 Compare November 26, 2026 02:21
@denik
denik marked this pull request as ready for review November 26, 2026 02:41
@denik
denik requested review from a team as code owners November 26, 2026 02:41

@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 bbbecb0. Each finding was verified against the code.

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

This PR adds the acceptance test whl_dynamic_same_distribution. It records how bundle deploy fails today when a dynamic_version artifact has two wheels of the same distribution: makePatchedWheel empties the shared patched_wheels/<artifact>_<distribution> directory, so the first patched wheel is deleted before it can be uploaded. The test reproduces the bug through the intended path. I have two points on the script. The jq request filter breaks the repo's testing rule and should use print_requests.py. The mtime comment gives the wrong reason for the two different timestamps.

@denik
denik force-pushed the denik/acc-record-patched-wheel-cleanup branch from bbbecb0 to 9914af5 Compare November 26, 2026 03:14

@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 Sonnet 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

…ibution

A dynamic_version artifact with two wheels of the same distribution
(here a py3 and a py310 tag) fails plain bundle deploy: the patched
wheel directory is emptied before each file is patched, so the first
patched wheel is gone by upload time.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/acc-record-patched-wheel-cleanup branch from 9914af5 to 0123c10 Compare November 26, 2026 04:13

@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 Sonnet 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

No issues found.

@denik
denik added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 5f99956 Nov 26, 2026
27 checks passed
@denik
denik deleted the denik/acc-record-patched-wheel-cleanup branch November 26, 2026 05:23
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