Skip to content

Install Ruff and Python prerequisites in bump-sdk-post - #7389

Merged
janniklasrose merged 6 commits into
mainfrom
janniklasrose/ruff-via-uv
Nov 10, 2026
Merged

janniklasrose merged 6 commits into
mainfrom
janniklasrose/ruff-via-uv

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Add install-ruff, which installs Ruff 0.9.1 with uv tool install ruff==0.9.1.
  • Run install-pythons and install-ruff in bump-sdk-post before generate-check and test-update. Add uv’s tool executable directory to PATH for test-update.
  • Update the bump-sdk skill documentation.

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-update stops 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-post call chain.

Tests

  • install-ruff succeeds on initial and repeated runs with isolated tool directories; the existing local Ruff installation is unchanged.
  • go test ./acceptance/internal -count=1 passes.
  • With externally installed Ruff 0.9.1 and UV_OFFLINE=true, both pass:
    • go test ./acceptance -run "^TestAccept$/prerequisites" -count=1
    • go test ./acceptance -run "^TestAccept$/bundle/templates/pydabs/check-formatting" -count=1
  • ./task --dry bump-sdk-post, YAML and Go formatting checks, ./task ws, and git diff --check pass.

Downloads inside the actual SDK bumper pod have not been verified.

This pull request and its description were written by Isaac.

…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>
@github-actions github-actions Bot added DABs DABs related issues PyDABs labels Nov 6, 2026
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>
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: c958385

Run: 42811532143

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 15 4:08
✅​ aws-windows-latest-4core-16gb 273 13 3:11
✅​ azure linux-2core-8gb 270 15 3:46
✅​ azure-windows-latest-4core-16gb 272 13 2:59
✅​ gcp linux-2core-8gb 271 15 4:24
✅​ gcp-windows-latest-4core-16gb 273 13 3:14
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:08 aws-windows-latest-4core-16gb TestAccept
2:33 azure-windows-latest-4core-16gb TestAccept
2:30 gcp-windows-latest-4core-16gb TestAccept

@janniklasrose
janniklasrose requested a review from pietern November 6, 2026 13:32
@janniklasrose
janniklasrose marked this pull request as ready for review November 6, 2026 13:32
@janniklasrose
janniklasrose requested review from a team as code owners November 6, 2026 13:32

@pietern pietern 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.

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.

@janniklasrose janniklasrose changed the title Run ruff via uv tool run in acceptance tests and install Pythons in bump-sdk-post Install Ruff and Python prerequisites in bump-sdk-post Nov 10, 2026
@janniklasrose
janniklasrose added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 1e44bb4 Nov 10, 2026
37 checks passed
@janniklasrose
janniklasrose deleted the janniklasrose/ruff-via-uv branch November 10, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues PyDABs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants