Skip to content

Commit 7d4688f

Browse files
denikIsaac
andauthored
Remove bundle/internal/tf and related code (#6932)
Removes the generated Terraform provider schema (`bundle/internal/tf/schema`) and its codegen module (`bundle/internal/tf/codegen`), plus what only existed to feed or consume them: - The Terraform install in the acceptance harness (`install_terraform.py`). - The `terraform_dabs_map` generator and the `generate-tf-schema` / `generate-schema-map` tasks. `generated.go` stays as a frozen snapshot used by the state migration. - The bump-tf skill and related Taskfile, lint, deadcode, and doc entries. This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 78e49e1 commit 7d4688f

429 files changed

Lines changed: 28 additions & 29457 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/rules/auto-generated-files.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ globs:
77
- "acceptance/**/output.txt"
88
- "acceptance/**/output.*.txt"
99
- "acceptance/**/output/**"
10-
- "bundle/internal/tf/schema/*.go"
11-
- "bundle/terraform_dabs_map/generated.go"
1210
- "cmd/account/*.go"
1311
- "cmd/account/**/*.go"
1412
- "cmd/workspace/*.go"
@@ -28,8 +26,6 @@ paths:
2826
- "acceptance/**/output.txt"
2927
- "acceptance/**/output.*.txt"
3028
- "acceptance/**/output/**"
31-
- "bundle/internal/tf/schema/*.go"
32-
- "bundle/terraform_dabs_map/generated.go"
3329
- "cmd/account/*.go"
3430
- "cmd/account/**/*.go"
3531
- "cmd/workspace/*.go"
@@ -69,9 +65,6 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut
6965
- `./task generate-clijson` — refreshes `.codegen/cli.json` from the OpenAPI spec via genkit (requires universe repo); also updates `internal/genkit/tagging.py`.
7066
- Direct engine generated YAML:
7167
- `./task generate-direct` (or `./task generate-direct-apitypes`, `./task generate-direct-resources`)
72-
- Terraform provider schema and DABs field map:
73-
- `./task generate-tf-schema`
74-
- `./task generate-schema-map`
7568
- Bundle schemas:
7669
- `./task generate-schema`
7770
- 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).

‎.agents/skills/bump-sdk/SKILL.md‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ allowed-tools: Read, Edit, Write, Bash, Glob, Grep, WebFetch, AskUserQuestion
99

1010
The SDK version lives in `go.mod` (`github.com/databricks/databricks-sdk-go`) and the pinned spec SHA lives in `.codegen/_openapi_sha`.
1111
These two move as a pair; everything else in this skill is regenerated from them or is fallout you fix by hand.
12-
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`, `bundle/terraform_dabs_map/generated.go`, `python/databricks/bundles/**`); regenerate them.
12+
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.
1313

1414
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.
1515

@@ -34,7 +34,6 @@ Decide with the user whether to keep the tagging-producer drift or restore those
3434
**4. Regenerate everything downstream.**
3535
Run `./task generate-cligen` to regenerate the command stubs from the refreshed `.codegen/cli.json`.
3636
Run `./task generate-check` to regenerate the reproducible artifacts (schema, validation, direct-engine YAML, refschema, pydabs); a clean tree afterwards means zero drift.
37-
Regenerate the DABs<->TF field map with `./task generate-schema-map`, which `generate-check` does not run.
3837
Run `go build ./...` and fix compile breakages before touching acceptance goldens.
3938

4039
**5. Handle SDK breaking changes.**
@@ -82,6 +81,5 @@ The bump-specific content for that template is a `## Changes` line ``Bump `githu
8281

8382
## Stacking and rebasing
8483

85-
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.
8684
On any merge/rebase conflict in a generated file like `generated.go`, resolve to a compilable state and then regenerate rather than hand-merging.
8785
A squash-merged upstream PR leaves its original commits as non-ancestors, so the branch log may show duplicate commits even when the net diff vs `origin/main` is correct.

‎.agents/skills/bump-tf/SKILL.md‎

Lines changed: 0 additions & 98 deletions
This file was deleted.

‎.agents/skills/bump-tf/registry-workaround.md‎

Lines changed: 0 additions & 64 deletions
This file was deleted.

‎.github/workflows/bump-vuln-deps.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ jobs:
4242
4343
# govulncheck is pinned as a tool dependency in tools/go.mod; -modfile
4444
# resolves it from there while it scans the root module (the working
45-
# directory). Only the root module ships; tools/ and
46-
# bundle/internal/tf/codegen are build- and CI-only, so they are not
47-
# scanned. Its vulnerability database is fetched from vuln.go.dev at
45+
# directory). Only the root module ships; tools/ is build- and
46+
# CI-only, so it is not scanned. Its vulnerability database is fetched from vuln.go.dev at
4847
# runtime, so the pinned binary still uses the latest advisories.
4948
#
5049
# -scan module reports every advisory affecting a required module,

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ test-output.json
3636
test-output-unit.json
3737
test-output-unit-root.json
3838
test-output-unit-tools.json
39-
test-output-unit-codegen.json
4039
test-output-acc.json
4140

4241
# Taskfile cache

‎.golangci.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ linters:
6363
files:
6464
- "**"
6565
- "!**/bundle/internal/schema/**"
66-
- "!**/bundle/internal/tf/codegen/**"
6766
- "!**/bundle/internal/validation/**"
6867
- "!**/internal/cligen/**"
6968
deny:

0 commit comments

Comments
 (0)