Skip to content

Add bump-sdk skill#5991

Open
pietern wants to merge 2 commits into
mainfrom
bump-sdk-skill
Open

Add bump-sdk skill#5991
pietern wants to merge 2 commits into
mainfrom
bump-sdk-skill

Conversation

@pietern

@pietern pietern commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Changes

Add a user-invocable bump-sdk skill that codifies the databricks-sdk-go bump workflow: resolve the SDK version (optionally from a Terraform provider's go.mod) and its paired .codegen/_openapi_sha, apply the bump, regenerate cli.json via genkit and all downstream artifacts, handle SDK breaking-change and acceptance-test fallout, verify, and add a changelog fragment.

Why

The bump has non-obvious steps that are easy to get wrong. The SDK version and the OpenAPI spec SHA must move as a pair, and the -update acceptance run can silently mask a real failure when a schema change makes the Terraform and direct engines diverge, so the skill requires a non-update verify pass to catch it. Capturing the workflow makes future bumps repeatable and keeps it consistent with the sibling bump-tf skill.

Tests

Validated by running the skill hands-off in a fresh worktree on origin/main (Terraform provider already at v1.122.0, SDK not yet bumped) to bump to v0.160.0. Its result matched the manually authored #5982 on every substantive point (resolved versions and the source-code edits), differing only where the skill correctly defers a destructive test deletion to the user.

This pull request and its description were written by Isaac.

Add a user-invocable bump-sdk skill that codifies the databricks-sdk-go bump
workflow: resolve the SDK version (optionally from a Terraform provider's
go.mod) and its paired .codegen/_openapi_sha, apply the bump, regenerate
cli.json via genkit and all downstream artifacts, handle SDK breaking-change
and acceptance-test fallout, verify, and add a changelog fragment.

Consistent with the sibling bump-tf skill.

Co-authored-by: Isaac
@github-actions

Copy link
Copy Markdown
Contributor

Waiting for approval

Could not determine reviewers from git history.
Round-robin suggestion: @lennartkats-db

Eligible reviewers: @andrewnester, @anton-107, @denik, @janniklasrose, @lennartkats-db, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2b378f0

Run: 29817400562

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1127 3:21
💚​ aws windows 4 4 229 1125 2:47
🔄​ aws-ucws linux 2 4 4 312 1044 3:57
💚​ aws-ucws windows 4 4 316 1042 3:30
💚​ azure linux 4 4 227 1126 2:53
💚​ azure windows 4 4 229 1124 3:47
💚​ azure-ucws linux 4 4 316 1041 4:07
💚​ azure-ucws windows 4 4 318 1039 4:41
💚​ gcp linux 4 4 226 1128 2:39
💚​ gcp windows 4 4 228 1126 2:25
10 interesting tests: 4 RECOVERED, 4 SKIP, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFilerWorkspaceNotebook ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFilerWorkspaceNotebook/sqlJupyterNotebook.ipynb ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 1 slowest tests (at least 2 minutes):
duration env testname
2:11 azure-ucws windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform

## Steps

**1. Resolve the target versions.**
Use the SDK version the user gave, or if they want "the version the Terraform provider vX.Y.Z uses", read the provider's `go.mod` at that tag: `https://raw.githubusercontent.com/databricks/terraform-provider-databricks/vX.Y.Z/go.mod`.

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 skill should look up the latest if none provided - now the step sounds like user input is required so it will ask


**2. Apply the core bump.**
Run `go get github.com/databricks/databricks-sdk-go@vX.Y.Z` to update `go.mod`/`go.sum`.
Edit `.codegen/_openapi_sha` to the new SHA; the file has no trailing newline, so match the existing format.

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 file has no trailing newline, so match the existing format.

I've seen Claude struggle to maintain the format and go in a loop writing scripts to accomplish this - I'd say just

echo ${SHA} > .codegen/_openapi_sha

is sufficient since the file gets auto-formatted by generate


**8. Verify the rest.**
Run `./task fmt` and `./task lint-q`; if either touches `acceptance/`, a fixture is wrong, so fix the source rather than editing output.
Run the full root-module unit suite: `go test ./acceptance/internal ./libs/... ./internal/... ./cmd/... ./bundle/... ./experimental/... .`.

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.

use the task?

Comment on lines +68 to +69
Confirm no internal proxy URL leaked into any lock file: `./task check-uv-lock` covers `*uv.lock`, but the genkit `*.py.lock` files are outside that glob, so grep them for `pypi-proxy.cloud.databricks.com` separately.
The `check-uv-lock` glob and the genkit lock revert are a known coverage gap; the internal proxy can re-leak into `internal/genkit/*.py.lock` on any future `generate-clijson`, so re-check after every run.

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.

note to self: need to wrap up #5830

Comment on lines +74 to +79
Add it without `(#NNNN)` now; backfill the number after the PR exists, then run `./task links` to expand it into the full markdown link in place and commit the result.

**10. Commit, push, PR.**
Pushing to `databricks/cli` requires `gh auth switch --user pietern` first, because the default gh account lacks write access.
Then follow the `pr-checklist` skill for the PR, and do not run `gh pr create` without the user's explicit permission.
Commit body and PR description:

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.

we should consolidate into pr-checklist (side note: would be nice to change that skill to be a bit more instructive & make sure it's invoked - still see agents not doing it unless I ask it explicitly)


## Stacking and rebasing

If a Terraform-provider bump PR is open and touches the same files (the bind-test `role` value and `bundle/terraform_dabs_map/generated.go`), stack on it or merge it once landed.

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.

Suggested change
If a Terraform-provider bump PR is open and touches the same files (the bind-test `role` value and `bundle/terraform_dabs_map/generated.go`), stack on it or merge it once landed.
If a Terraform-provider bump PR is open and touches the same files (e.g. a value in `bundle/terraform_dabs_map/generated.go`), stack on it or merge it once landed.

too specific

Two fixes from a rubric evaluation against the authoring skill:
- Use `./task generate-schema-map` for the DABs<->TF field map instead of a
  raw `go test ... -update`, and drop the incorrect "the tasks don't cover it"
  claim (the task wraps exactly that test), matching the bump-tf skill.
- Genericize the push-auth line: a shared skill should not hardcode an
  individual maintainer's gh handle.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants