Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .agents/skills/bump-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ The acceptance goldens are the exception: they need CI's `uv` index, see step 4.
The SDK bumper (eng-dev-ecosystem automation) does steps 1-4 for every new stable Go SDK release.
It opens a PR from the `automation/go-sdk-vX.Y.Z` branch of `databricks/cli`, titled `Update Go SDK to vX.Y.Z`, containing the `go get` + `go mod tidy` result, `.codegen/_openapi_sha`, `.codegen/cli.json` (genkit, followed by `./task generate-clijson-post`), and a changelog fragment without a PR link.
`generate-clijson-post` ends with `bump-sdk-post` (step 4), whose error it ignores so that the bumper, which aborts on any error there, still opens a PR. The PR therefore carries whatever got regenerated, and stays red while the bump needs hand fixes (step 5).
Nothing logs the task's output in the bumper, so judge from the PR what got regenerated.
The bumper's environment has `uv` and Python but no `ruff`, which the acceptance tests require, so `test-update` stops at `TestAccept/prerequisites` there and bumper PRs carry no golden updates.
Bumper PRs opened before `generate-clijson-post` ran `bump-sdk-post` (e.g. #7138) have nothing downstream of `cli.json`: their stale command stubs usually fail to compile, which fails lint and every test job.
The bumper does not merge CLI PRs, and it reuses an open PR for the same release on later runs, keeping commits pushed to its branch.

Expand Down Expand Up @@ -55,7 +57,7 @@ Everything after it needs judgment.
Run directly, it fails on errors: `generate-refschema` and `test-update` build the CLI, so it fails while the bump still breaks compilation; fix that (step 5) and rerun the task.

Run it in CI's environment, or the goldens pick up local drift:
- `uv` index: the acceptance tests build wheels offline from the vendored packages (`UV_OFFLINE`, `UV_FIND_LINKS`), but `uv` still reads its default index's pages from the shared cache. If a `uv.toml` (e.g. `/etc/uv/uv.toml`, which applies even under the tests' temporary `HOME`) makes an internal PyPI proxy the default index, `uv` picks versions from cached proxy pages that it cannot download offline and fails with `No solution found when resolving: hatchling`; `-update` then bakes that error into dozens of template goldens and deletes their `output/` trees. The same failure on `main` tells it apart from bump fallout. Set `UV_DEFAULT_INDEX=https://pypi.org/simple`, CI's default, for the acceptance runs only: the generators fetch tools such as `ruff` and need the proxy where `pypi.org` is unreachable. On such a machine, run the task's two halves separately: `./task generate-check`, then `UV_DEFAULT_INDEX=https://pypi.org/simple ./task test-update` (and the same prefix for `./task test` later). If `generate-clijson` already ran `test-update` without it, first revert the `acceptance/` churn (`git checkout -- acceptance`, plus any stray untracked files it left).
- `uv` index: the acceptance tests build wheels offline from the vendored packages (`UV_OFFLINE`, `UV_FIND_LINKS`), but `uv` still reads its default index's pages from the shared cache. If a `uv.toml` (e.g. `/etc/uv/uv.toml`, which applies even under the tests' temporary `HOME`) makes an internal PyPI proxy the default index, `uv` picks versions from cached proxy pages that it cannot download offline and fails with `No solution found when resolving: hatchling`; `-update` then bakes that error into dozens of template goldens and deletes their `output/` trees. The same failure on `main` tells it apart from bump fallout. Set `UV_DEFAULT_INDEX=https://pypi.org/simple` for the acceptance runs only, so `uv` stops reading cached proxy pages (CI's test jobs point `UV_INDEX_URL` at a JFrog mirror instead): the generators fetch tools such as `ruff` and need the proxy where `pypi.org` is unreachable. On such a machine, run the task's two halves separately: `./task generate-check`, then `UV_DEFAULT_INDEX=https://pypi.org/simple ./task test-update` (and the same prefix for `./task test` later). If `generate-clijson` already ran `test-update` without it, first revert the `acceptance/` churn (`git checkout -- acceptance`, plus any stray untracked files it left).
- Python: CI installs the managed interpreters with `./task install-pythons`; do the same.
- Go: the `toolchain` in `go.mod`. A newer local `go` also changes goldens and generated `gofmt` output; use `GOTOOLCHAIN=<pinned>` if they differ.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Run Go and Python lint checks (does not include formatting checks)
# `task lint` runs golangci-lint and `ruff check` (lint-python). ruff is
# provided by uvx, installed above; formatting is checked by `task fmt` below.
# run via `uv tool run`, installed above; formatting is checked by `task fmt` below.
run: go tool -modfile=tools/task/go.mod task lint

- name: "task fmt: Python, Go and YAML formatting"
Expand Down
4 changes: 3 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ vars:
EXE_EXT: '{{if eq OS "windows"}}.exe{{end}}'
# Pinned ruff (linter + formatter). Keep in sync with the version in
# .github/workflows/check.yml and python/Taskfile.yml.
RUFF: uvx ruff@0.15.17
# `uv tool run` rather than its `uvx` alias: the SDK bumper's image ships
# only the `uv` binary.
RUFF: uv tool run ruff@0.15.17
TEST_PACKAGES: ./acceptance/internal ./libs/... ./internal/... ./cmd/... ./bundle/... ./experimental/ssh/... .
ACCEPTANCE_TEST_FILTER: ""
# Single brace-expansion glob covering every //go:embed target in the repo,
Expand Down
9 changes: 5 additions & 4 deletions python/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ tasks:
cmds:
# Pinned to match the global ruff version (see root Taskfile fmt-python and
# .github/workflows/check.yml). ruff config lives in ../ruff.toml.
- uvx ruff@0.15.17 check --fix databricks databricks_tests || true
- uvx ruff@0.15.17 format
- uv tool run ruff@0.15.17 check --fix databricks databricks_tests || true
- uv tool run ruff@0.15.17 format

pydabs-docs:
desc: Generate pydabs documentation
Expand Down Expand Up @@ -90,8 +90,9 @@ tasks:
- cd codegen && uv run --frozen -m pytest codegen_tests
- cd codegen && uv run --frozen -m codegen.main --output ..
# Generated code is fixed and formatted by the global ruff (see ../ruff.toml).
- uvx ruff@0.15.17 check --fix databricks databricks_tests || true
- uvx ruff@0.15.17 format
# `uv tool run`, not `uvx`: the SDK bumper runs this with only `uv` installed.
- uv tool run ruff@0.15.17 check --fix databricks databricks_tests || true
- uv tool run ruff@0.15.17 format

pydabs-build:
desc: Build pydabs wheel
Expand Down
Loading