Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1f90a9d
WIP: add sdk-go modules and migration plan
denik Oct 14, 2026
1f62cc1
WIP: generate JSON mirrors of sdk-go types (libs/sdktypes)
denik Oct 14, 2026
338586f
WIP: sdkclients (sdk-go clients from resolved config) and apiclient
denik Oct 14, 2026
dd165ff
WIP: apierrs
denik Oct 14, 2026
ccc2922
WIP: switch cmdctx/root/bundle to sdkclients
denik Oct 14, 2026
316eb49
WIP: periodic checkpoint
denik Oct 14, 2026
e44fcc2
WIP: bundle/config/resources on sdk-go mirror types
denik Oct 14, 2026
870b8c5
WIP: sdktypesgen synthesizes ToSDK/FromSDK for every type
denik Oct 14, 2026
c90b74f
WIP: periodic checkpoint
denik Oct 14, 2026
cd60556
WIP: periodic checkpoint
denik Oct 14, 2026
759a63c
WIP: periodic checkpoint
denik Oct 14, 2026
6c54d87
WIP: periodic checkpoint
denik Oct 14, 2026
342b89d
WIP: periodic checkpoint
denik Oct 14, 2026
6af33b1
WIP: periodic checkpoint
denik Oct 14, 2026
6f910df
WIP: periodic checkpoint
denik Oct 14, 2026
7396a10
WIP: libs and bundle migrated to sdk-go
denik Oct 14, 2026
6c46341
Add generate-sdktypes task
denik Oct 15, 2026
6ab2e54
WIP: periodic checkpoint
denik Oct 15, 2026
52969b4
WIP: periodic checkpoint
denik Oct 15, 2026
2f80cd4
WIP: periodic checkpoint
denik Oct 15, 2026
efd3b78
Sort mirror fields by JSON name; tidy go.mod; fix retry/aitools tests
denik Oct 15, 2026
cefe28d
Fix bundle deployment sequence_id decoding; drop num_workers with aut…
denik Oct 15, 2026
f340a0b
WIP: periodic checkpoint
denik Oct 15, 2026
0ad564e
WIP: periodic checkpoint
denik Oct 15, 2026
d2df1ec
WIP: periodic checkpoint
denik Oct 15, 2026
3f559d7
WIP: periodic checkpoint
denik Oct 15, 2026
6798a67
Keep explicit zero values on API types; inactivity HTTP timeout; stri…
denik Oct 15, 2026
59383b6
WIP: periodic checkpoint
denik Oct 15, 2026
9e4190b
Postgres: raw REST updates for oneof group masks; pointer purge_on_de…
denik Oct 15, 2026
545cb6e
WIP: periodic checkpoint
denik Oct 15, 2026
8d9ed8e
Normalize non-JSON API error bodies; default debug truncation; fix pi…
denik Oct 15, 2026
a467309
WIP: periodic checkpoint
denik Oct 15, 2026
80d7447
Fix list prompt lookup, pointer query params, direct generator type n…
denik Oct 15, 2026
cd962dd
WIP: periodic checkpoint
denik Oct 15, 2026
9ee261d
WIP: periodic checkpoint
denik Oct 15, 2026
ce31df2
WIP: periodic checkpoint
denik Oct 15, 2026
b69dc48
Remove ForceSendFields test remnants and migration notes
denik Oct 15, 2026
586a13c
Merge remote-tracking branch 'origin/main' into denik/migrate-sdk-go
denik Oct 15, 2026
0f4d975
Remove dead code flagged by deadcode check
denik Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ tasks:
# Runs first: regenerates CLI command stubs from the checked-in
# .codegen/cli.json (no universe checkout needed). Refreshing cli.json
# itself from the OpenAPI spec is the separate `generate-clijson` task.
- task: generate-sdktypes
- task: generate-cligen
# Refreshes acceptance/bundle/refschema/out.fields.txt, which feeds
# generate-direct-apitypes and generate-direct-resources below.
Expand All @@ -798,6 +799,7 @@ tasks:
generate-check:
desc: Run the reproducible generators (CI drift subset of `generate`)
cmds:
- task: generate-sdktypes
- task: generate-cligen
- task: generate-refschema
- task: generate-schema
Expand All @@ -812,13 +814,32 @@ tasks:
# templates derived from genkit's cli_v0 generator and formats the output
# in-process (whitespace normalization, unused-import pruning, gofmt), so
# the result matches the committed files byte-for-byte.
# Regenerates the JSON-tagged mirrors of sdk-go types (libs/sdktypes) and the
# oneof registry used by libs/sdktypes/sdkconv, for the sdk-go packages listed
# in libs/sdktypes/packages.txt ("<module path> <dir>" per line). Inputs are
# the sdk-go sources pinned in go.mod.
generate-sdktypes:
desc: Regenerate libs/sdktypes from the sdk-go packages in go.mod
sources:
- go.mod
- libs/sdktypes/packages.txt
- internal/sdktypesgen/*.go
- internal/sdkconvgen/*.go
cmds:
- "sh -c 'sed \"s|^\\([^ ]*\\).*|github.com/databricks/sdk-go/\\1|\" libs/sdktypes/packages.txt | xargs go run ./internal/sdktypesgen libs/sdktypes'"
- "sh -c 'sed \"s|^\\([^ ]*\\).*|github.com/databricks/sdk-go/\\1|\" libs/sdktypes/packages.txt | xargs go run ./internal/sdkconvgen libs/sdktypes/sdkconv/oneofs.generated.go'"

generate-cligen:
desc: Regenerate CLI command stubs from .codegen/cli.json
sources:
- .codegen/cli.json
- .gitattributes.manual
- internal/cligen/**/*.go
- internal/cligen/templates/*.tmpl
- internal/cligen/http_verbs.json
- libs/sdkclients/services.go
- libs/sdktypes/**/types.generated.go
- go.mod
generates:
- cmd/workspace/**/*.go
- cmd/account/**/*.go
Expand Down Expand Up @@ -962,6 +983,7 @@ tasks:
- "**/*.go"
- .codegen/cli.json
- bundle/internal/schema/annotations.yml
- bundle/internal/sdkmeta/legacy.json
- exclude: "**/*_test.go"
- go.mod
- go.sum
Expand All @@ -976,6 +998,8 @@ tasks:
desc: Generate enum and required field validation code
sources:
- "**/*.go"
- .codegen/cli.json
- bundle/internal/sdkmeta/legacy.json
- exclude: "**/*_test.go"
- go.mod
- go.sum
Expand Down
4 changes: 3 additions & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
"time"
"unicode/utf8"

"github.com/databricks/cli/libs/utils"

"github.com/google/uuid"

"github.com/databricks/cli/acceptance/internal"
Expand Down Expand Up @@ -1013,7 +1015,7 @@ func runTest(t *testing.T,
// output) are stable across OSes and don't need per-test slash replacements.
cmd.Env = append(cmd.Env, "TESTDIR="+filepath.ToSlash(absDir))
cmd.Env = append(cmd.Env, "CLOUD_ENV="+cloudEnv)
cmd.Env = append(cmd.Env, "CURRENT_USER_NAME="+user.UserName)
cmd.Env = append(cmd.Env, "CURRENT_USER_NAME="+utils.Deref(user.UserName))
if !isRunningOnCloud {
// Expose a guest token for the as-test-sp helper: the guest prefix plus
// the primary identity's uuid suffix make it share the same fake
Expand Down
8 changes: 6 additions & 2 deletions acceptance/air/run-submit/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ Stream logs after submission using:
"permission_level": "CAN_EDIT",
"service_principal_name": "training-sp"
}
]
],
"request_object_id": "42",
"request_object_type": "experiments"
}
}
{
Expand All @@ -63,7 +65,9 @@ Stream logs after submission using:
"permission_level": "CAN_MANAGE_RUN",
"service_principal_name": "training-sp"
}
]
],
"request_object_id": "123",
"request_object_type": "jobs"
}
}
{
Expand Down
3 changes: 0 additions & 3 deletions acceptance/bundle/artifacts/whl_dynamic/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ resources:
tasks:
- task_key: TestTask
existing_cluster_id: "0717-132531-5opeqon1"
python_wheel_task:
package_name: "my_test_code"
entry_point: "run"
libraries:
- whl: ./my_test_code/dist/*.whl
- whl: prebuilt/other_test_code-0.0.1-py3-none-any.whl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
}
],
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
}
]
Expand Down
18 changes: 5 additions & 13 deletions acceptance/bundle/artifacts/whl_dynamic/out.plan_update.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,12 @@
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
}
],
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"task_key": "TestTask"
}
]
}
},
"remote_state": {
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json"
Expand All @@ -95,13 +89,11 @@
}
],
"format": "MULTI_TASK",
"job_id": [TEST_JOB_ID],
"max_concurrent_runs": 1,
"name": "[default] My Wheel Job",
"queue": {
"enabled": true
},
"run_as_user_name": "[USERNAME]",
"tasks": [
{
"email_notifications": {},
Expand Down Expand Up @@ -141,17 +133,17 @@
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
}
],
"python_wheel_task": {
"entry_point": "run",
"package_name": "my_test_code"
},
"run_if": "ALL_SUCCESS",
"task_key": "TestTask",
"timeout_seconds": 0
}
],
"timeout_seconds": 0,
"webhook_notifications": {}
"webhook_notifications": {},
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"job_id": [TEST_JOB_ID],
"run_as_user_name": "[USERNAME]"
},
"changes": {
"email_notifications": {
Expand Down
1 change: 1 addition & 0 deletions acceptance/bundle/deploy/experimental-python/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"job_id": [JOB1_ID],
"run_as_user_name": "[USERNAME]",
"settings": {
"deployment": {
"kind": "BUNDLE",
Expand Down
1 change: 1 addition & 0 deletions acceptance/bundle/deploy/python-notebook/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"job_id": [MY_JOB_ID],
"run_as_user_name": "[USERNAME]",
"settings": {
"deployment": {
"kind": "BUNDLE",
Expand Down
10 changes: 5 additions & 5 deletions acceptance/bundle/deploy/readplan/basic/out.plan_skip.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
"resources.jobs.job": {
"action": "skip",
"remote_state": {
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json"
},
"edit_mode": "UI_LOCKED",
"email_notifications": {},
"format": "MULTI_TASK",
"job_id": [JOB_ID],
"max_concurrent_runs": 1,
"name": "test-job",
"queue": {
"enabled": true
},
"run_as_user_name": "[USERNAME]",
"timeout_seconds": 0,
"webhook_notifications": {}
"webhook_notifications": {},
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"job_id": [JOB_ID],
"run_as_user_name": "[USERNAME]"
},
"changes": {
"email_notifications": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
"ALL_PRIVILEGES"
]
}
]
],
"securable_full_name": "main.myschema",
"securable_type": "schema"
}
}

Expand Down Expand Up @@ -67,7 +69,9 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
"ALL_PRIVILEGES"
]
}
]
],
"securable_full_name": "main.myschema",
"securable_type": "schema"
}
}
The following resources will be deleted:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"action": "create",
"new_state": {
"value": {
"parent": "${resources.postgres_branches.branch.name}",
"postgres_role": "app_role",
"role_id": "test-role"
"role_id": "test-role",
"parent": "${resources.postgres_branches.branch.name}"
},
"vars": {
"parent": "${resources.postgres_branches.branch.name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"__id__": "[DASHBOARD_ID]",
"state": {
"display_name": "test dashboard [UNIQUE_NAME]",
"embed_credentials": true,
"etag": [ETAG],
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources",
"published": true,
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
"serialized_dashboard": "{\"pages\":[{\"displayName\":\"Page One\",\"name\":\"02724bf2\"}]}",
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]"
"embed_credentials": true,
"published": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
}
}
],
"name": "test-pipeline"
"name": "test-pipeline",
"pipeline_id": "[NEW_PIPELINE_ID]"
}
}
1 change: 1 addition & 0 deletions acceptance/bundle/dms/no-drift/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
}
],
"name": "bar-[UNIQUE_NAME]",
"pipeline_id": "[UUID]",
"schema": "default",
"serverless": true
}
Expand Down
3 changes: 1 addition & 2 deletions acceptance/bundle/generate/dashboard-inplace/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
"parent_path": "/Users/[USERNAME]/.bundle/dashboard update inplace/default/resources",
"path": "/Users/[USERNAME]/.bundle/dashboard update inplace/default/resources/test dashboard.lvdash.json",
"serialized_dashboard": "{\"a\":\"b\"}\n",
"update_time": "[TIMESTAMP]",
"warehouse_id": ""
"update_time": "[TIMESTAMP]"
}

=== update the dashboard file using bundle generate
Expand Down
1 change: 0 additions & 1 deletion acceptance/bundle/generate/git_job/out.job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ resources:
source: WORKSPACE
git_source:
git_branch: main
git_commit: abcdef
git_provider: github
git_url: https://git.databricks.com
3 changes: 1 addition & 2 deletions acceptance/bundle/generate/git_job/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Response.Body = '''
"git_source": {
"git_url": "https://git.databricks.com",
"git_provider": "github",
"git_branch": "main",
"git_commit": "abcdef"
"git_branch": "main"
},
"tasks": [
{
Expand Down
3 changes: 1 addition & 2 deletions acceptance/bundle/generate/include_warning/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Response.Body = '''
"git_source": {
"git_url": "https://git.databricks.com",
"git_provider": "github",
"git_branch": "main",
"git_commit": "abcdef"
"git_branch": "main"
},
"tasks": [
{
Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/generate/pipeline/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pattern = "GET /api/2.0/pipelines/1234"
Response.Body = '''
{
"pipeline_id": 1234,
"pipeline_id": "1234",
"spec": {
"name": "generate-pipeline",
"development": true,
Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/generate/pipeline_with_glob/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pattern = "GET /api/2.0/pipelines/1234"
Response.Body = '''
{
"pipeline_id": 1234,
"pipeline_id": "1234",
"spec": {
"name": "generate-pipeline",
"libraries": [
Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/generate/pipeline_with_sql/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pattern = "GET /api/2.0/pipelines/1234"
Response.Body = '''
{
"pipeline_id": 1234,
"pipeline_id": "1234",
"spec": {
"name": "generate-pipeline",
"clusters": [
Expand Down
10 changes: 5 additions & 5 deletions acceptance/bundle/migrate/auto/clean/out.plan_update.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
}
},
"remote_state": {
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json"
},
"edit_mode": "UI_LOCKED",
"email_notifications": {},
"format": "MULTI_TASK",
"job_id": [TEST_JOB_ID],
"max_concurrent_runs": 1,
"name": "Test Auto-Migrate Job",
"queue": {
"enabled": true
},
"run_as_user_name": "[USERNAME]",
"timeout_seconds": 0,
"webhook_notifications": {}
"webhook_notifications": {},
"created_time": [UNIX_TIME_MILLIS],
"creator_user_name": "[USERNAME]",
"job_id": [TEST_JOB_ID],
"run_as_user_name": "[USERNAME]"
},
"changes": {
"email_notifications": {
Expand Down
Loading
Loading