Skip to content

Commit fafcc91

Browse files
authored
Merge branch 'main' into feat/lifecycle-started-sql-warehouse
2 parents 2a3e95a + 5c0aa32 commit fafcc91

398 files changed

Lines changed: 9810 additions & 1326 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.

.github/OWNERTEAMS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313

1414
team:bundle @andrewnester @anton-107 @denik @janniklasrose @pietern @shreyas-goenka
1515
team:platform @simonfaltum @renaudhartert-db @hectorcast-db @parthban-db @tanmay-db @Divyansh-db @tejaskochar-db @mihaimitrea-db @chrisst @rauchy
16-
team:eng-apps-devex @fjakobs @jamesbroadhead @Shridhad @atilafassina @keugenek @arsenyinfo @igrekun @pkosiec @MarioCadenas @pffigueiredo @ditadi @calvarjorge
16+
team:eng-apps-devex @fjakobs @Shridhad @atilafassina @keugenek @igrekun @pkosiec @MarioCadenas @pffigueiredo @ditadi @calvarjorge

.github/actions/setup-build-environment/action.yml

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,55 @@ runs:
1515
- name: Setup JFrog
1616
uses: ./.github/actions/setup-jfrog
1717

18-
- name: Create cache identifier
19-
run: echo "${{ inputs.cache-key }}" > cache.txt
20-
shell: bash
21-
22-
- name: Setup Go
18+
- id: setup-go
19+
name: Setup Go
2320
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2421
with:
2522
go-version-file: go.mod
26-
cache-dependency-path: |
27-
go.sum
28-
cache.txt
23+
# Disable setup-go's built-in cache; the steps below manage the
24+
# cache so that only push-to-main runs save it. PR / merge_group /
25+
# schedule saves are scoped to refs no other run can read, and
26+
# they evict main's caches from the 10 GB GHA cache quota via LRU.
27+
#
28+
# See: https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching
29+
cache: false
30+
31+
- name: Resolve Go cache paths
32+
id: go-paths
33+
shell: bash
34+
run: |
35+
echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
36+
echo "mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
37+
38+
# On runs against main (push + the scheduled wipe-and-repopulate
39+
# cron added in #2092): restore now, save at job end via the
40+
# unified action's post-step (which fires at the calling job's
41+
# end, even when invoked from a composite).
42+
- name: Restore and save Go cache (main)
43+
if: github.ref == 'refs/heads/main'
44+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
45+
with:
46+
path: |
47+
${{ steps.go-paths.outputs.mod }}
48+
${{ steps.go-paths.outputs.build }}
49+
key: setup-go-${{ inputs.cache-key }}-${{ runner.os }}-go${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}
50+
restore-keys: |
51+
setup-go-${{ inputs.cache-key }}-${{ runner.os }}-go${{ steps.setup-go.outputs.go-version }}-
52+
53+
# On every other ref (PR / merge_group): restore only. Prefix
54+
# fallback via restore-keys means runs whose go.sum differs from
55+
# main still restore main's most recent cache and rebuild only
56+
# the delta.
57+
- name: Restore Go cache (non-main)
58+
if: github.ref != 'refs/heads/main'
59+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
60+
with:
61+
path: |
62+
${{ steps.go-paths.outputs.mod }}
63+
${{ steps.go-paths.outputs.build }}
64+
key: setup-go-${{ inputs.cache-key }}-${{ runner.os }}-go${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}
65+
restore-keys: |
66+
setup-go-${{ inputs.cache-key }}-${{ runner.os }}-go${{ steps.setup-go.outputs.go-version }}-
2967
3068
- name: Setup Python
3169
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0

.github/workflows/push.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
branches:
1515
- main
1616
schedule:
17-
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily
17+
- cron: '0 0 * * *' # Runs at 00:00 UTC daily
1818

1919
env:
2020
GOTESTSUM_FORMAT: github-actions
@@ -137,22 +137,11 @@ jobs:
137137
with:
138138
cache-key: test-${{ matrix.deployment }}
139139

140-
- name: Run tests without coverage
141-
# We run tests without coverage on PR, merge_group, and schedule because we don't make use of coverage information
142-
# and would like to run the tests as fast as possible. We run it on schedule as well, because that is what
143-
# populates the cache and cache may include test results.
144-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.event_name == 'schedule' }}
140+
- name: Run tests
145141
env:
146142
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
147143
run: go tool -modfile=tools/task/go.mod task test
148144

149-
- name: Run tests with coverage
150-
# Only run 'task cover' on push to main to make sure it does not get broken.
151-
if: ${{ github.event_name == 'push' }}
152-
env:
153-
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
154-
run: go tool -modfile=tools/task/go.mod task cover
155-
156145
- name: Upload gotestsum JSON output
157146
# Always upload so we can inspect timing even if tests fail.
158147
if: ${{ always() }}
@@ -163,10 +152,15 @@ jobs:
163152
if-no-files-found: warn
164153
retention-days: 7
165154

166-
- name: Check out.test.toml files are up to date
155+
- name: Check no files changed or appeared after running tests
167156
run: |
157+
# Register untracked files with intent-to-add so `git diff` reports them
158+
# too; a plain `git diff` ignores new files, which is how a missing
159+
# out.test.toml previously slipped through. Ignored test artifacts are
160+
# unaffected because intent-to-add respects .gitignore.
161+
git add --intent-to-add .
168162
if ! git diff --exit-code; then
169-
echo "ERROR: detected changed files in the repository; Most likely you have out.test.toml files that are out of date. Run 'go test ./acceptance -run \"^TestAccept$\" -only-out-test-toml' to update."
163+
echo "ERROR: detected changed or new files in the repository; Most likely you have out.test.toml files that are out of date. Run 'go test ./acceptance -run \"^TestAccept$\" -only-out-test-toml' to update."
170164
exit 1
171165
fi
172166

.release_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"timestamp": "2026-05-21 08:07:33+0000"
2+
"timestamp": "2026-05-27 14:58:58+0000"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Version changelog
22

3+
## Release v1.1.0 (2026-05-27)
4+
5+
### Bundles
6+
* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable ([#5295](https://github.com/databricks/cli/pull/5295)).
7+
8+
* Added `vector_search_indexes` as a bundle resource (direct engine only). Supports UC grants and prompts for confirmation on recreate or delete since both are destructive ([#5123](https://github.com/databricks/cli/pull/5123)).
9+
10+
### Dependency updates
11+
12+
* Bump Go toolchain to 1.26.3 ([#5302](https://github.com/databricks/cli/pull/5302)).
13+
* Bump `github.com/databricks/databricks-sdk-go` from v0.132.0 to v0.136.0.
14+
15+
316
## Release v1.0.0 (2026-05-21)
417

518
### Notable Changes

NEXT_CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# NEXT CHANGELOG
22

3-
## Release v1.1.0
3+
## Release v1.2.0
44

55
### Notable Changes
66

77
### CLI
8+
* `experimental open` now opens every DABs resource type that has a workspace URL, picking up `catalogs`, `schemas`, `volumes`, `database_instances`, `database_catalogs`, `synced_database_tables`, `postgres_catalogs`, `postgres_synced_tables`, `quality_monitors`, `vector_search_endpoints`, and `vector_search_indexes` ([#5346](https://github.com/databricks/cli/pull/5346)).
89

910
### Bundles
10-
* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable ([#5295](https://github.com/databricks/cli/pull/5295)).
11+
* Retry transient HTTP 5xx and 408 errors in direct deployment engine ([#5349](https://github.com/databricks/cli/pull/5349), [#5364](https://github.com/databricks/cli/pull/5364)).
12+
* Preserve `.designer.ipynb` suffix when translating notebook task paths so Lakeflow Designer files referenced from a `notebook_task` resolve correctly in the workspace ([#5370](https://github.com/databricks/cli/pull/5370)).
13+
* Fix script output dropping last line without trailing newline ([#4995](https://github.com/databricks/cli/pull/4995)).
14+
* Add `--select` flag to `bundle plan` and `bundle deploy` to plan/deploy a subset of resources (e.g. `--select my_job` or `--select jobs.my_job`); resources referenced by the selection are included transitively. Direct engine only ([#5413](https://github.com/databricks/cli/pull/5413)).
1115

1216
### Dependency updates
13-
14-
* Bump Go toolchain to 1.26.3 ([#5302](https://github.com/databricks/cli/pull/5302)).
15-
* Bump `github.com/databricks/databricks-sdk-go` from v0.132.0 to v0.136.0.

Taskfile.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ tasks:
5353
# committed). Run `./task generate` explicitly when codegen inputs change.
5454
- task: generate-refschema
5555
- task: generate-schema
56+
- task: generate-schema-map
5657
- task: generate-schema-docs
5758
- task: generate-validation
5859
- task: generate-docs
@@ -706,13 +707,17 @@ tasks:
706707
# can be invoked standalone.
707708

708709
generate:
709-
desc: Run all generators (genkit, refschema, schema, docs, validation, direct, pydabs)
710+
desc: Run all generators (genkit, tf-schema, refschema, schema, docs, validation, direct, pydabs)
710711
cmds:
711712
# Runs first: regenerates CLI command stubs from the OpenAPI spec at
712713
# .codegen/_openapi_sha. SDK version bumps (go.mod/go.sum) are a manual
713714
# step outside this task; TestConsistentDatabricksSdkVersion (run inside
714715
# generate-genkit) asserts the two stay in sync.
715716
- task: generate-genkit
717+
# Requires Terraform provider access (set TF_CLI_CONFIG_FILE to a
718+
# filesystem mirror, or rely on the public registry). Only re-runs when
719+
# bundle/internal/tf/codegen/schema/version.go changes.
720+
- task: generate-tf-schema
716721
# Refreshes acceptance/bundle/refschema/out.fields.txt, which feeds
717722
# generate-direct-apitypes and generate-direct-resources below.
718723
- task: generate-refschema
@@ -745,12 +750,20 @@ tasks:
745750
sh: echo "${UNIVERSE_DIR:-$HOME/universe}"
746751
cmds:
747752
- |
748-
echo "Checking out universe at SHA: $(cat .codegen/_openapi_sha)"
749-
cd {{.UNIVERSE_DIR}}
750-
if ! git cat-file -e $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha) 2>/dev/null; then
751-
git fetch --filter=blob:none origin master
753+
if [ -z "$UNIVERSE_SKIP_CHECKOUT" ]; then
754+
if ! git -C {{.UNIVERSE_DIR}} diff --quiet || ! git -C {{.UNIVERSE_DIR}} diff --cached --quiet; then
755+
echo "Error: universe repo at {{.UNIVERSE_DIR}} has uncommitted changes; commit or stash them, or set UNIVERSE_SKIP_CHECKOUT=1 to skip checkout"
756+
exit 1
757+
fi
758+
echo "Checking out universe at SHA: $(cat .codegen/_openapi_sha)"
759+
cd {{.UNIVERSE_DIR}}
760+
if ! git cat-file -e $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha) 2>/dev/null; then
761+
git fetch --filter=blob:none origin master
762+
fi
763+
git checkout $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha)
764+
else
765+
echo "UNIVERSE_SKIP_CHECKOUT set; using current {{.UNIVERSE_DIR}} HEAD"
752766
fi
753-
git checkout $(cat {{.ROOT_DIR}}/.codegen/_openapi_sha)
754767
- echo "Building genkit..."
755768
- cd {{.UNIVERSE_DIR}} && bazel build //openapi/genkit
756769
- echo "Generating CLI code..."
@@ -846,6 +859,32 @@ tasks:
846859
cmds:
847860
- "sh -c 'go run ./bundle/internal/validation/. && gofmt -w -s ./bundle/internal/validation/generated'"
848861

862+
generate-schema-map:
863+
desc: Regenerate bundle/terraform_dabs_map/generated.go
864+
sources:
865+
- "**/*.go"
866+
- exclude: bundle/terraform_dabs_map/generated.go
867+
- go.mod
868+
- go.sum
869+
- "{{.EMBED_SOURCES}}"
870+
generates:
871+
- bundle/terraform_dabs_map/generated.go
872+
cmds:
873+
- go test ./bundle/terraform_dabs_map -run TestGenerateSchemaMap -update -v
874+
875+
generate-tf-schema:
876+
desc: Regenerate bundle/internal/tf/schema from the Databricks Terraform provider
877+
dir: bundle/internal/tf/codegen
878+
sources:
879+
- schema/version.go
880+
- templates/**
881+
- "**/*.go"
882+
- exclude: "**/*_test.go"
883+
generates:
884+
- ../schema/*.go
885+
cmds:
886+
- go run .
887+
849888
generate-direct:
850889
desc: Generate direct engine config (apitypes + resources)
851890
deps: ['generate-direct-apitypes', 'generate-direct-resources']

acceptance/bin/fault.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env python3
2+
"""Set up a fault rule on the testserver for the current test token.
3+
4+
Usage: fault.py PATTERN STATUS_CODE OFFSET TIMES
5+
6+
PATTERN HTTP method and path, supports trailing * wildcard,
7+
e.g. "PUT /api/2.0/permissions/pipelines/*"
8+
STATUS_CODE HTTP status code to return, e.g. 504
9+
OFFSET number of requests to let through before fault starts
10+
TIMES number of times to return the fault response
11+
12+
The rule is scoped to the current DATABRICKS_TOKEN so it only affects
13+
the test that registers it, even when tests share a server.
14+
"""
15+
16+
import json
17+
import os
18+
import sys
19+
import urllib.request
20+
21+
host = os.environ.get("DATABRICKS_HOST", "")
22+
token = os.environ.get("DATABRICKS_TOKEN", "")
23+
24+
if not host:
25+
print("DATABRICKS_HOST not set", file=sys.stderr)
26+
sys.exit(1)
27+
28+
if len(sys.argv) != 5:
29+
print(f"usage: {sys.argv[0]} PATTERN STATUS_CODE OFFSET TIMES", file=sys.stderr)
30+
sys.exit(1)
31+
32+
pattern, status_code, offset, times = sys.argv[1], int(sys.argv[2]), int(sys.argv[3]), int(sys.argv[4])
33+
body = '{"error_code":"INJECTED","message":"Fault injected by test."}'
34+
35+
data = json.dumps(
36+
{
37+
"pattern": pattern,
38+
"status_code": status_code,
39+
"body": body,
40+
"offset": offset,
41+
"times": times,
42+
}
43+
).encode()
44+
45+
req = urllib.request.Request(
46+
f"{host}/__testserver/fault",
47+
data=data,
48+
headers={"Content-Type": "application/json", "Authorization": f"Bearer {token}"},
49+
method="POST",
50+
)
51+
urllib.request.urlopen(req)

acceptance/bin/print_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def main():
166166
requests_file = Path(args.fname)
167167

168168
if not requests_file.exists():
169-
sys.exit(f"File {requests_file} not found")
169+
sys.exit(f"File {requests_file.as_posix()} not found")
170170

171171
with open(requests_file) as fobj:
172172
data = fobj.read()

acceptance/bundle/bundle_tag/id/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Resources:
6868
Jobs:
6969
foo:
7070
Name: Untitled
71-
URL: [DATABRICKS_URL]/jobs/[NUMID]?o=[NUMID]
71+
URL: [DATABRICKS_URL]/jobs/[NUMID]?w=[NUMID]
7272

7373
>>> [CLI] bundle destroy --auto-approve
7474
The following resources will be deleted:

0 commit comments

Comments
 (0)