Repository navigation
Install Ruff and Python prerequisites in bump-sdk-post - #7389
Merged
Merged
Conversation
…ump-sdk-post The acceptance harness required a `ruff` binary on PATH for every run, although only the pydabs check-formatting test uses it. The SDK bumper's image has uv but no ruff, so `test-update` there stopped at TestAccept/prerequisites and bumper PRs never refreshed goldens such as acceptance/help/output.txt (#7277). Run ruff through `uv tool run ruff@0.9.1` instead: the harness fetches that release into the uv cache before it turns on UV_OFFLINE, and the test script runs the same command offline from the cache. The prefetch lives in testAccept rather than the prerequisites subtest, which a -run filter for a test directory skips. Once the ruff check no longer stops it, test-update in the bumper hits the next gap: its image has only Python 3.12, while bundle tests pin 3.10 and one template matrix needs 3.9-3.13, and uv is offline during tests. Run install-pythons at the start of bump-sdk-post, as CI does in setup-build-environment, so a missing interpreter is not baked into the goldens as a uv error. Co-authored-by: Isaac <no-reply@databricks.com>
CI's setup-uv exports UV_CACHE_DIR, so the ruff prefetch filled that cache while the harness pinned test scripts to the HOME-derived default: every check-formatting variant failed with "ruff was not found in the cache". Ask uv for its cache directory (as getUVPythonInstallDir already does for the Python install dir) instead of deriving the default from HOME. Pass -q to uv in the check-formatting script: the first variant to build the tool environment for the test interpreter otherwise prints "Installed 1 package" to stderr, which the other variants do not. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: c958385
Top 3 slowest tests (at least 2 minutes):
|
pietern
reviewed
Nov 10, 2026
pietern
left a comment
Contributor
There was a problem hiding this comment.
The next change that adds a plain ruff call to the acc tests will succeed until the next bump-sdk workflow run. Isn't it better to just install it in the bump environment (can be in a local $PATH)? Then those future additions can't break the bumper again.
pietern
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
install-ruff, which installs Ruff 0.9.1 withuv tool install ruff==0.9.1.install-pythonsandinstall-ruffinbump-sdk-postbeforegenerate-checkandtest-update. Add uv’s tool executable directory toPATHfortest-update.The acceptance runner, scripts, and goldens are unchanged. Ruff remains an environment prerequisite; the runner does not install it.
Why
The SDK bumper’s image has uv and Python 3.12 but no Ruff, so
test-updatestops at the Ruff prerequisite. It also lacks the managed Python versions needed by the offline acceptance tests, which can cause missing-interpreter errors to be written into goldens.Prepare these prerequisites outside the runner, as CI already does. The bumper reaches this setup through the existing
generate-clijson-post→bump-sdk-postcall chain.Tests
install-ruffsucceeds on initial and repeated runs with isolated tool directories; the existing local Ruff installation is unchanged.go test ./acceptance/internal -count=1passes.UV_OFFLINE=true, both pass:go test ./acceptance -run "^TestAccept$/prerequisites" -count=1go test ./acceptance -run "^TestAccept$/bundle/templates/pydabs/check-formatting" -count=1./task --dry bump-sdk-post, YAML and Go formatting checks,./task ws, andgit diff --checkpass.Downloads inside the actual SDK bumper pod have not been verified.
This pull request and its description were written by Isaac.