Skip to content
Open
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
10 changes: 5 additions & 5 deletions .agents/rules/auto-generated-files.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Rules for how to deal with auto-generated files
globs:
- ".codegen/cli.json"
- ".codegen/cli.json.gz"
- ".gitattributes"
- "acceptance/**/out*"
- "acceptance/**/output.txt"
Expand All @@ -20,7 +20,7 @@ globs:
- "python/databricks/bundles/*/__init__.py"
- "python/databricks/bundles/*/_models/*.py"
paths:
- ".codegen/cli.json"
- ".codegen/cli.json.gz"
- ".gitattributes"
- "acceptance/**/out*"
- "acceptance/**/output.txt"
Expand Down Expand Up @@ -61,13 +61,13 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut
- Everything, in one shot:
- `./task generate` — aggregator that runs all generators below
- OpenAPI SDK/CLI command stubs and related generated artifacts:
- `./task generate-cligen` — regenerates `cmd/account/**`, `cmd/workspace/**` and `.gitattributes` from the checked-in `.codegen/cli.json`.
- `./task generate-clijson` — refreshes `.codegen/cli.json` from the OpenAPI spec via genkit (requires universe repo); also updates `internal/genkit/tagging.py`.
- `./task generate-cligen` — regenerates `cmd/account/**`, `cmd/workspace/**` and `.gitattributes` from the checked-in `.codegen/cli.json.gz`.
- `./task generate-clijson` — refreshes `.codegen/cli.json.gz` from the OpenAPI spec via genkit (requires universe repo); also updates `internal/genkit/tagging.py`.
- Direct engine generated YAML:
- `./task generate-direct` (or `./task generate-direct-apitypes`, `./task generate-direct-resources`)
- Bundle schemas:
- `./task generate-schema`
- Rewrites `bundle/internal/schema/annotations.yml` in place: upstream docs are sourced from `.codegen/cli.json` at generation time, and the file is synced with the config structure (placeholders added, stale entries dropped).
- Rewrites `bundle/internal/schema/annotations.yml` in place: upstream docs are sourced from `.codegen/cli.json.gz` at generation time, and the file is synced with the config structure (placeholders added, stale entries dropped).
- The docs schema (`jsonschema_for_docs.json`) is not generated on main; it is built and published to the `docgen` branch on release by `.github/workflows/update-schema-docs.yml`.
- Validation generated code:
- `./task generate-validation`
Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/bump-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ allowed-tools: Read, Edit, Write, Bash, Glob, Grep, WebFetch, AskUserQuestion

The SDK version lives in `go.mod` (`github.com/databricks/databricks-sdk-go`) and the pinned spec SHA lives in `.codegen/_openapi_sha`.
These two move as a pair; everything else in this skill is regenerated from them or is fallout you fix by hand.
Do not hand-edit generated files (`.codegen/cli.json`, `cmd/workspace/*`, `cmd/account/*`, `bundle/schema/jsonschema.json`, `bundle/internal/validation/generated/*`, `bundle/direct/dresources/configs/*.generated.yml`, `python/databricks/bundles/**`); regenerate them.
Do not hand-edit generated files (`.codegen/cli.json.gz`, `cmd/workspace/*`, `cmd/account/*`, `bundle/schema/jsonschema.json`, `bundle/internal/validation/generated/*`, `bundle/direct/dresources/configs/*.generated.yml`, `python/databricks/bundles/**`); regenerate them.

The Python tasks (`pydabs-*`, and the `pydabs-codegen` step inside `generate-check`) all run through `uv`. If one fails because `uv` is missing or because the host's `python3` is too old (e.g. 3.9), install `uv` (`curl -LsSf https://astral.sh/uv/install.sh | sh`) rather than touching the system Python: `uv run` provisions the interpreter each package pins (`>=3.10`, and `==3.13.*` under `python/codegen/`) and downloads it if needed. Do not chase the system Python version.
The acceptance goldens are the exception: they need CI's `uv` index, see step 4.

## The SDK bumper

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.
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.gz` (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.
Expand Down
2 changes: 1 addition & 1 deletion .codegen/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cli.json linguist-generated=true
cli.json.gz linguist-generated=true
Loading
Loading