Add bump-sdk skill#5991
Conversation
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
Waiting for approvalCould not determine reviewers from git history. Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
Integration test reportCommit: 2b378f0
10 interesting tests: 4 RECOVERED, 4 SKIP, 2 flaky
Top 1 slowest tests (at least 2 minutes):
|
| ## 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`. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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/... .`. |
| 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. |
| 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: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| 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
Changes
Add a user-invocable
bump-sdkskill that codifies the databricks-sdk-go bump workflow: resolve the SDK version (optionally from a Terraform provider'sgo.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
-updateacceptance 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 siblingbump-tfskill.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.