Skip to content

Commit 0169c0c

Browse files
authored
Merge branch 'main' into denik/reproduce-schemas-issue
2 parents 6216b37 + b9620cb commit 0169c0c

245 files changed

Lines changed: 7665 additions & 378 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.

‎.agent/skills/pr-checklist/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ After the commands above pass, scrub the diff before pushing. The quick version:
4747

4848
Follow `.github/PULL_REQUEST_TEMPLATE.md` exactly. Use its section headings (`## Changes`, `## Why`, `## Tests`) in the same order, and fill each one in. Do not invent new sections (`## Summary`, `## Test plan`, etc.), do not drop sections, and do not leave the HTML comment placeholders in the final body — replace them with real content. If a section genuinely does not apply (e.g. a docs-only change has no test steps), say so explicitly under that heading rather than removing it.
4949

50+
**RULE: Be concise in the PR summary.** Overly verbose descriptions tend to be ignored by reviewers. Let the diff speak for itself and only describe at a high level what you have implemented/what components were touched.
51+
5052
When using `gh pr create`, read `.github/PULL_REQUEST_TEMPLATE.md` first and base `--body` on it.
5153

5254
If an agent (you) authored or substantially helped author the PR, disclose it on the last line of the body, e.g. `_This PR was written by Claude Code._` or `_PR description drafted with Claude Code._`. Be honest about the level of involvement — "written by" vs. "drafted with" vs. "reviewed by" — and keep it to a single italicized line so it doesn't crowd the template sections.

‎.github/OWNERS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
/libs/apps/ team:eng-apps-devex
2222
/acceptance/apps/ team:eng-apps-devex
2323

24+
# Sandbox
25+
/cmd/sandbox/ @pietern @akshaysingla-db @shuochen0311
26+
/acceptance/cmd/sandbox/ @pietern @akshaysingla-db @shuochen0311
27+
2428
# Auth
2529
/cmd/auth/ team:platform
2630
/libs/auth/ team:platform

‎.github/workflows/push.yml‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,58 @@ jobs:
318318
run: |
319319
go tool -modfile=tools/task/go.mod task test-pipelines
320320
321+
test-sandbox:
322+
needs:
323+
- cleanups
324+
- testmask
325+
326+
# Only run if the target is in the list of targets from testmask
327+
if: ${{ contains(fromJSON(needs.testmask.outputs.targets), 'test-sandbox') }}
328+
name: "task test-sandbox (${{matrix.os.name}})"
329+
runs-on: ${{ matrix.os.runner }}
330+
331+
defaults:
332+
run:
333+
shell: bash
334+
335+
permissions:
336+
id-token: write
337+
contents: read
338+
339+
env:
340+
TASK_CONCURRENCY: ${{ matrix.os.name == 'windows' && '1' || '' }}
341+
342+
strategy:
343+
fail-fast: false
344+
matrix:
345+
os:
346+
- name: linux
347+
runner:
348+
group: databricks-protected-runner-group-large
349+
labels: linux-ubuntu-latest-large
350+
351+
- name: windows
352+
runner:
353+
group: databricks-protected-runner-group-large
354+
labels: windows-server-latest-large
355+
356+
- name: macos
357+
runner:
358+
labels: macos-latest
359+
360+
steps:
361+
- name: Checkout repository and submodules
362+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
363+
364+
- name: Setup build environment
365+
uses: ./.github/actions/setup-build-environment
366+
with:
367+
cache-key: test-sandbox
368+
369+
- name: Run tests
370+
run: |
371+
go tool -modfile=tools/task/go.mod task test-sandbox
372+
321373
# This job groups the result of all the above test jobs.
322374
# It is a required check, so it blocks auto-merge and the merge queue.
323375
#
@@ -333,6 +385,7 @@ jobs:
333385
- test-exp-aitools
334386
- test-exp-ssh
335387
- test-pipelines
388+
- test-sandbox
336389

337390
if: ${{ always() }}
338391
name: test-result

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ go.work.sum
7373
.codegen/openapi.json
7474

7575
.claude/settings.local.json
76+
.claude/scheduled_tasks.lock
7677
.cursor/cli.json
7778
tools/gofumpt
7879
.claude/worktrees/

‎NEXT_CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
## Release v1.3.0
44

55
### Notable Changes
6+
* The `direct` deployment engine is now Generally Available and the default for new deployments. To opt out, set `engine: terraform` under `bundle` in your `databricks.yml` or set `DATABRICKS_BUNDLE_ENGINE=terraform`. Existing deployments keep their current engine; see https://docs.databricks.com/aws/en/dev-tools/bundles/direct to migrate.
67

78
### CLI
9+
* Added the `databricks quickstart` command, a short introduction to the CLI that prints a human-friendly guide interactively and an agent-oriented version when run non-interactively ([#5464](https://github.com/databricks/cli/pull/5464)).
10+
* `databricks auth login` no longer prompts for workspace selection when logging in to an account console host (`https://accounts.*`). Pass `--workspace-id` explicitly to store a workspace ID on such a profile ([#5504](https://github.com/databricks/cli/pull/5504)).
811

912
### Bundles
1013
* Set the default `data_security_mode` to `DATA_SECURITY_MODE_AUTO` in bundle templates ([#5452](https://github.com/databricks/cli/pull/5452)).
1114
* Mark vector search index index_subtype as backend_default to prevent drift after deployment ([#5454](https://github.com/databricks/cli/pull/5454)).
15+
* `bundle deployment migrate`: handle resources added to or removed from `databricks.yml` since the last Terraform deploy ([#5463](https://github.com/databricks/cli/pull/5463)).
1216
* Fix spurious recreate of schemas and volumes whose names use mixed case ([#5531](https://github.com/databricks/cli/pull/5531)).
1317

1418
### Dependency updates

‎Taskfile.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,25 @@ tasks:
658658
--packages ./acceptance/... \
659659
-- -timeout=${LOCAL_TIMEOUT:-30m} -run "TestAccept/pipelines"
660660
661+
test-sandbox:
662+
desc: Run sandbox unit and acceptance tests
663+
sources:
664+
- cmd/sandbox/**
665+
- acceptance/cmd/sandbox/**
666+
cmds:
667+
- |
668+
{{.GO_TOOL}} gotestsum \
669+
--format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \
670+
--no-summary=skipped \
671+
--packages ./cmd/sandbox/... \
672+
-- -timeout=${LOCAL_TIMEOUT:-30m}
673+
- |
674+
{{.GO_TOOL}} gotestsum \
675+
--format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \
676+
--no-summary=skipped \
677+
--packages ./acceptance/... \
678+
-- -timeout=${LOCAL_TIMEOUT:-30m} -run "TestAccept/cmd/sandbox"
679+
661680
# --- Integration tests ---
662681

663682
integration:

‎acceptance/bundle/help/bundle-sync/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Flags:
1919
--full perform full synchronization (default is incremental)
2020
-h, --help help for sync
2121
--interval duration file system polling interval (for --watch) (default 1s)
22-
--output type type of the output format
2322
--watch watch local file system for changes
2423

2524
Global Flags:
2625
--debug enable debug logging
26+
-o, --output type output type: text or json (default text)
2727
-p, --profile string ~/.databrickscfg profile
2828
-t, --target string bundle target to use (if applicable)
2929
--var strings set values for variables defined in bundle config. Example: --var="foo=bar"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bundle:
2+
name: migrate-added-test
3+
4+
resources:
5+
jobs:
6+
job_a: {name: "Job A"}
7+
#job_b: {name: "Job B"}

‎acceptance/bundle/migrate/added/out.test.toml‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
>>> [CLI] bundle deploy
3+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/migrate-added-test/default/files...
4+
Deploying resources...
5+
Updating deployment state...
6+
Deployment complete!
7+
8+
>>> musterr [CLI] bundle deployment migrate
9+
Note: Migration should be done after a full deploy. Running plan now to verify that deployment was done:
10+
create jobs.job_b
11+
12+
Plan: 1 to add, 0 to change, 0 to delete, 1 unchanged
13+
Error: 'databricks bundle plan' shows actions planned, aborting migration. Please run 'databricks bundle deploy' first to ensure your bundle is up to date, If actions persist after deploy, skip plan check with --noplancheck option
14+
15+
>>> [CLI] bundle deployment migrate --noplancheck
16+
Success! Migrated 1 resources to direct engine state file: [TEST_TMP_DIR]/.databricks/bundle/default/resources.json
17+
18+
Validate the migration by running "databricks bundle plan", there should be no actions planned.
19+
20+
The state file is not synchronized to the workspace yet. To do that and finalize the migration, run "bundle deploy".
21+
22+
To undo the migration, remove [TEST_TMP_DIR]/.databricks/bundle/default/resources.json and rename [TEST_TMP_DIR]/.databricks/bundle/default/terraform/terraform.tfstate.backup to [TEST_TMP_DIR]/.databricks/bundle/default/terraform/terraform.tfstate
23+
24+
25+
>>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
26+
create jobs.job_b
27+
28+
Plan: 1 to add, 0 to change, 0 to delete, 1 unchanged
29+
30+
>>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy
31+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/migrate-added-test/default/files...
32+
Deploying resources...
33+
Updating deployment state...
34+
Deployment complete!
35+
36+
>>> print_requests.py //jobs/create
37+
{
38+
"headers": {
39+
"User-Agent": [
40+
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_deploy cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
41+
]
42+
},
43+
"method": "POST",
44+
"path": "/api/2.2/jobs/create",
45+
"body": {
46+
"deployment": {
47+
"kind": "BUNDLE",
48+
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/migrate-added-test/default/state/metadata.json"
49+
},
50+
"edit_mode": "UI_LOCKED",
51+
"format": "MULTI_TASK",
52+
"max_concurrent_runs": 1,
53+
"name": "Job B",
54+
"queue": {
55+
"enabled": true
56+
}
57+
}
58+
}
59+
60+
>>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
61+
Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged

0 commit comments

Comments
 (0)