Skip to content

Commit 2ddc930

Browse files
Upgrade Go SDK to v0.110.0 (#4552)
## Changes 1. Update `github.com/databricks/databricks-sdk-go` from `v0.106.0` to `v0.110.0` and bump `.codegen/_openapi_sha` to the matching OpenAPI commit. 2. Run canonical generation (`make generate`) and sync generated outputs across commands, schemas, direct resources, and Python bundle bindings. 3. Apply targeted post-generate fixes for lint/test drift (external location/postgres struct updates, quality monitor staticcheck annotations, duplicate schema override cleanup, refschema golden update). ## Why Keep CLI generated surfaces aligned with the latest Go SDK/OpenAPI changes and ensure generation remains green on lint/tests. ## Tests - [x] `./tools/golangci-lint run` - [x] `go test ./internal/build ./bundle/internal/schema ./bundle/direct/dresources ./bundle/config/resources -count=1` - [x] `go test ./acceptance -run '^TestAccept/bundle/refschema$' -update -timeout=30m` (run twice) - [x] `go test ./acceptance -run '^TestAccept/bundle/refschema$' -timeout=30m` - [x] `pushd python && make codegen && popd` Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 505db2c commit 2ddc930

File tree

28 files changed

+1631
-262
lines changed

28 files changed

+1631
-262
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
69a174b6c47c5e1039a5f14271440c10e33998ce
1+
281b4455821119945fcc4c850cf2cfad03e23c6c

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cmd/account/custom-app-integration/custom-app-integration.go linguist-generated=
99
cmd/account/disable-legacy-features/disable-legacy-features.go linguist-generated=true
1010
cmd/account/enable-ip-access-lists/enable-ip-access-lists.go linguist-generated=true
1111
cmd/account/encryption-keys/encryption-keys.go linguist-generated=true
12+
cmd/account/endpoints/endpoints.go linguist-generated=true
1213
cmd/account/esm-enablement-account/esm-enablement-account.go linguist-generated=true
1314
cmd/account/federation-policy/federation-policy.go linguist-generated=true
1415
cmd/account/groups-v2/groups-v2.go linguist-generated=true

acceptance/bundle/refschema/out.fields.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resources.apps.*.service_principal_client_id string ALL
196196
resources.apps.*.service_principal_id int64 ALL
197197
resources.apps.*.service_principal_name string ALL
198198
resources.apps.*.source_code_path string INPUT
199+
resources.apps.*.space string ALL
199200
resources.apps.*.update_time string ALL
200201
resources.apps.*.updater string ALL
201202
resources.apps.*.url string ALL
@@ -668,6 +669,7 @@ resources.external_locations.*.created_at int64 REMOTE
668669
resources.external_locations.*.created_by string REMOTE
669670
resources.external_locations.*.credential_id string REMOTE
670671
resources.external_locations.*.credential_name string ALL
672+
resources.external_locations.*.effective_enable_file_events bool ALL
671673
resources.external_locations.*.enable_file_events bool ALL
672674
resources.external_locations.*.encryption_details *catalog.EncryptionDetails ALL
673675
resources.external_locations.*.encryption_details.sse_encryption_details *catalog.SseEncryptionDetails ALL
@@ -771,6 +773,9 @@ resources.jobs.*.git_source.job_source *jobs.JobSource ALL
771773
resources.jobs.*.git_source.job_source.dirty_state jobs.JobSourceDirtyState ALL
772774
resources.jobs.*.git_source.job_source.import_from_git_branch string ALL
773775
resources.jobs.*.git_source.job_source.job_config_path string ALL
776+
resources.jobs.*.git_source.sparse_checkout *jobs.SparseCheckout ALL
777+
resources.jobs.*.git_source.sparse_checkout.patterns []string ALL
778+
resources.jobs.*.git_source.sparse_checkout.patterns[*] string ALL
774779
resources.jobs.*.health *jobs.JobsHealthRules ALL
775780
resources.jobs.*.health.rules []jobs.JobsHealthRule ALL
776781
resources.jobs.*.health.rules[*] jobs.JobsHealthRule ALL
@@ -2573,7 +2578,12 @@ resources.postgres_endpoints.*.suspend_timeout_duration *duration.Duration INPUT
25732578
resources.postgres_endpoints.*.uid string REMOTE
25742579
resources.postgres_endpoints.*.update_time *time.Time REMOTE
25752580
resources.postgres_endpoints.*.url string INPUT
2581+
resources.postgres_projects.*.budget_policy_id string INPUT STATE
25762582
resources.postgres_projects.*.create_time *time.Time REMOTE
2583+
resources.postgres_projects.*.custom_tags []postgres.ProjectCustomTag INPUT STATE
2584+
resources.postgres_projects.*.custom_tags[*] postgres.ProjectCustomTag INPUT STATE
2585+
resources.postgres_projects.*.custom_tags[*].key string INPUT STATE
2586+
resources.postgres_projects.*.custom_tags[*].value string INPUT STATE
25772587
resources.postgres_projects.*.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings INPUT STATE
25782588
resources.postgres_projects.*.default_endpoint_settings.autoscaling_limit_max_cu float64 INPUT STATE
25792589
resources.postgres_projects.*.default_endpoint_settings.autoscaling_limit_min_cu float64 INPUT STATE
@@ -2591,6 +2601,11 @@ resources.postgres_projects.*.name string REMOTE
25912601
resources.postgres_projects.*.pg_version int INPUT STATE
25922602
resources.postgres_projects.*.project_id string INPUT STATE
25932603
resources.postgres_projects.*.spec *postgres.ProjectSpec REMOTE
2604+
resources.postgres_projects.*.spec.budget_policy_id string REMOTE
2605+
resources.postgres_projects.*.spec.custom_tags []postgres.ProjectCustomTag REMOTE
2606+
resources.postgres_projects.*.spec.custom_tags[*] postgres.ProjectCustomTag REMOTE
2607+
resources.postgres_projects.*.spec.custom_tags[*].key string REMOTE
2608+
resources.postgres_projects.*.spec.custom_tags[*].value string REMOTE
25942609
resources.postgres_projects.*.spec.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings REMOTE
25952610
resources.postgres_projects.*.spec.default_endpoint_settings.autoscaling_limit_max_cu float64 REMOTE
25962611
resources.postgres_projects.*.spec.default_endpoint_settings.autoscaling_limit_min_cu float64 REMOTE
@@ -2603,6 +2618,11 @@ resources.postgres_projects.*.spec.history_retention_duration *duration.Duration
26032618
resources.postgres_projects.*.spec.pg_version int REMOTE
26042619
resources.postgres_projects.*.status *postgres.ProjectStatus REMOTE
26052620
resources.postgres_projects.*.status.branch_logical_size_limit_bytes int64 REMOTE
2621+
resources.postgres_projects.*.status.budget_policy_id string REMOTE
2622+
resources.postgres_projects.*.status.custom_tags []postgres.ProjectCustomTag REMOTE
2623+
resources.postgres_projects.*.status.custom_tags[*] postgres.ProjectCustomTag REMOTE
2624+
resources.postgres_projects.*.status.custom_tags[*].key string REMOTE
2625+
resources.postgres_projects.*.status.custom_tags[*].value string REMOTE
26062626
resources.postgres_projects.*.status.default_endpoint_settings *postgres.ProjectDefaultEndpointSettings REMOTE
26072627
resources.postgres_projects.*.status.default_endpoint_settings.autoscaling_limit_max_cu float64 REMOTE
26082628
resources.postgres_projects.*.status.default_endpoint_settings.autoscaling_limit_min_cu float64 REMOTE

acceptance/cmd/workspace/apps/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Flags:
6868
--description string The description of the app.
6969
-h, --help help for update
7070
--json JSON either inline JSON string or @path/to/file.json with request body (default JSON (0 bytes))
71+
--space string Name of the space this app belongs to.
7172
--usage-policy-id string
7273

7374
Global Flags:

acceptance/help/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Unity Catalog
8181
model-versions Databricks provides a hosted version of MLflow Model Registry in Unity Catalog.
8282
online-tables Online tables provide lower latency and higher QPS access to data from Delta tables.
8383
policies Attribute-Based Access Control (ABAC) provides high leverage governance for enforcing compliance policies in Unity Catalog.
84-
quality-monitors [DEPRECATED] This API is deprecated.
84+
quality-monitors Deprecated: Please use the Data Quality Monitors API instead (REST: /api/data-quality/v1/monitors), which manages both Data Profiling and Anomaly Detection.
8585
registered-models Databricks provides a hosted version of MLflow Model Registry in Unity Catalog.
8686
resource-quotas Unity Catalog enforces resource quotas on all securable objects, which limits the number of resources that can be created.
8787
rfa Request for Access enables users to request access for Unity Catalog securables.
@@ -136,7 +136,7 @@ Clean Rooms
136136
clean-rooms A clean room uses Delta Sharing and serverless compute to provide a secure and privacy-protecting environment where multiple parties can work together on sensitive enterprise data without direct access to each other's data.
137137

138138
Quality Monitor
139-
quality-monitor-v2 [DEPRECATED] This API is deprecated.
139+
quality-monitor-v2 Deprecated: Please use the Data Quality Monitoring API instead (REST: /api/data-quality/v1/monitors).
140140

141141
Data Quality Monitoring
142142
data-quality Manage the data quality of Unity Catalog objects (currently support schema and table).

bundle/config/resources/quality_monitor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func (s QualityMonitor) MarshalJSON() ([]byte, error) {
3030
}
3131

3232
func (s *QualityMonitor) Exists(ctx context.Context, w *databricks.WorkspaceClient, id string) (bool, error) {
33+
//nolint:staticcheck // Bundle quality_monitor still targets legacy monitor endpoints; v1 data-quality migration is separate work.
3334
_, err := w.QualityMonitors.Get(ctx, catalog.GetQualityMonitorRequest{
3435
TableName: id,
3536
})

bundle/direct/dresources/external_location.go

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ func (*ResourceExternalLocation) PrepareState(input *resources.ExternalLocation)
2323

2424
func (*ResourceExternalLocation) RemapState(info *catalog.ExternalLocationInfo) *catalog.CreateExternalLocation {
2525
return &catalog.CreateExternalLocation{
26-
Comment: info.Comment,
27-
CredentialName: info.CredentialName,
28-
EnableFileEvents: info.EnableFileEvents,
29-
EncryptionDetails: info.EncryptionDetails,
30-
Fallback: info.Fallback,
31-
FileEventQueue: info.FileEventQueue,
32-
Name: info.Name,
33-
ReadOnly: info.ReadOnly,
34-
SkipValidation: false, // This is an input-only parameter, never returned by API
35-
Url: info.Url,
36-
ForceSendFields: utils.FilterFields[catalog.CreateExternalLocation](info.ForceSendFields),
26+
Comment: info.Comment,
27+
CredentialName: info.CredentialName,
28+
// Output-only field mirrored into state to avoid churn in remapped config.
29+
EffectiveEnableFileEvents: info.EffectiveEnableFileEvents,
30+
EnableFileEvents: info.EnableFileEvents,
31+
EncryptionDetails: info.EncryptionDetails,
32+
Fallback: info.Fallback,
33+
FileEventQueue: info.FileEventQueue,
34+
Name: info.Name,
35+
ReadOnly: info.ReadOnly,
36+
SkipValidation: false, // This is an input-only parameter, never returned by API
37+
Url: info.Url,
38+
ForceSendFields: utils.FilterFields[catalog.CreateExternalLocation](info.ForceSendFields),
3739
}
3840
}
3941

@@ -52,21 +54,23 @@ func (r *ResourceExternalLocation) DoCreate(ctx context.Context, config *catalog
5254
// DoUpdate updates the external location in place and returns remote state.
5355
func (r *ResourceExternalLocation) DoUpdate(ctx context.Context, id string, config *catalog.CreateExternalLocation, _ Changes) (*catalog.ExternalLocationInfo, error) {
5456
updateRequest := catalog.UpdateExternalLocation{
55-
Comment: config.Comment,
56-
CredentialName: config.CredentialName,
57-
EnableFileEvents: config.EnableFileEvents,
58-
EncryptionDetails: config.EncryptionDetails,
59-
Fallback: config.Fallback,
60-
FileEventQueue: config.FileEventQueue,
61-
Force: false,
62-
IsolationMode: "", // Not supported by DABs
63-
Name: id,
64-
NewName: "", // Only set if name actually changes (see DoUpdateWithID)
65-
Owner: "", // Not supported by DABs
66-
ReadOnly: config.ReadOnly,
67-
SkipValidation: config.SkipValidation,
68-
Url: config.Url,
69-
ForceSendFields: utils.FilterFields[catalog.UpdateExternalLocation](config.ForceSendFields, "IsolationMode", "Owner"),
57+
Comment: config.Comment,
58+
CredentialName: config.CredentialName,
59+
// Output-only field; never sent in update payload.
60+
EffectiveEnableFileEvents: false,
61+
EnableFileEvents: config.EnableFileEvents,
62+
EncryptionDetails: config.EncryptionDetails,
63+
Fallback: config.Fallback,
64+
FileEventQueue: config.FileEventQueue,
65+
Force: false,
66+
IsolationMode: "", // Not supported by DABs
67+
Name: id,
68+
NewName: "", // Only set if name actually changes (see DoUpdateWithID)
69+
Owner: "", // Not supported by DABs
70+
ReadOnly: config.ReadOnly,
71+
SkipValidation: config.SkipValidation,
72+
Url: config.Url,
73+
ForceSendFields: utils.FilterFields[catalog.UpdateExternalLocation](config.ForceSendFields, "IsolationMode", "Owner"),
7074
}
7175

7276
return r.client.ExternalLocations.Update(ctx, updateRequest)
@@ -75,21 +79,23 @@ func (r *ResourceExternalLocation) DoUpdate(ctx context.Context, id string, conf
7579
// DoUpdateWithID updates the external location and returns the new ID if the name changes.
7680
func (r *ResourceExternalLocation) DoUpdateWithID(ctx context.Context, id string, config *catalog.CreateExternalLocation) (string, *catalog.ExternalLocationInfo, error) {
7781
updateRequest := catalog.UpdateExternalLocation{
78-
Comment: config.Comment,
79-
CredentialName: config.CredentialName,
80-
EnableFileEvents: config.EnableFileEvents,
81-
EncryptionDetails: config.EncryptionDetails,
82-
Fallback: config.Fallback,
83-
FileEventQueue: config.FileEventQueue,
84-
Force: false,
85-
IsolationMode: "", // Not supported by DABs
86-
Name: id,
87-
NewName: "", // Initialized below if needed
88-
Owner: "", // Not supported by DABs
89-
ReadOnly: config.ReadOnly,
90-
SkipValidation: config.SkipValidation,
91-
Url: config.Url,
92-
ForceSendFields: utils.FilterFields[catalog.UpdateExternalLocation](config.ForceSendFields, "IsolationMode", "Owner"),
82+
Comment: config.Comment,
83+
CredentialName: config.CredentialName,
84+
// Output-only field; never sent in update payload.
85+
EffectiveEnableFileEvents: false,
86+
EnableFileEvents: config.EnableFileEvents,
87+
EncryptionDetails: config.EncryptionDetails,
88+
Fallback: config.Fallback,
89+
FileEventQueue: config.FileEventQueue,
90+
Force: false,
91+
IsolationMode: "", // Not supported by DABs
92+
Name: id,
93+
NewName: "", // Initialized below if needed
94+
Owner: "", // Not supported by DABs
95+
ReadOnly: config.ReadOnly,
96+
SkipValidation: config.SkipValidation,
97+
Url: config.Url,
98+
ForceSendFields: utils.FilterFields[catalog.UpdateExternalLocation](config.ForceSendFields, "IsolationMode", "Owner"),
9399
}
94100

95101
if config.Name != id {

bundle/direct/dresources/postgres_project.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ func (*ResourcePostgresProject) RemapState(remote *postgres.Project) *PostgresPr
3838
// This means we cannot detect remote drift for spec fields.
3939
// Use an empty struct (not nil) so field-level diffing works correctly.
4040
ProjectSpec: postgres.ProjectSpec{
41+
BudgetPolicyId: "",
42+
CustomTags: nil,
4143
DefaultEndpointSettings: nil,
4244
DisplayName: "",
4345
HistoryRetentionDuration: nil,

bundle/direct/dresources/quality_monitor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func (*ResourceQualityMonitor) RemapState(info *catalog.MonitorInfo) *QualityMon
6666
}
6767

6868
func (r *ResourceQualityMonitor) DoRead(ctx context.Context, id string) (*catalog.MonitorInfo, error) {
69+
//nolint:staticcheck // Direct quality_monitor resource still uses legacy monitor endpoints; v1 data-quality migration is separate work.
6970
return r.client.QualityMonitors.Get(ctx, catalog.GetQualityMonitorRequest{
7071
TableName: id,
7172
})
@@ -74,6 +75,7 @@ func (r *ResourceQualityMonitor) DoRead(ctx context.Context, id string) (*catalo
7475
func (r *ResourceQualityMonitor) DoCreate(ctx context.Context, config *QualityMonitorState) (string, *catalog.MonitorInfo, error) {
7576
req := config.CreateMonitor
7677
req.TableName = config.TableName
78+
//nolint:staticcheck // Direct quality_monitor resource still uses legacy monitor endpoints; v1 data-quality migration is separate work.
7779
response, err := r.client.QualityMonitors.Create(ctx, req)
7880
if err != nil || response == nil {
7981
return "", nil, err
@@ -99,6 +101,7 @@ func (r *ResourceQualityMonitor) DoUpdate(ctx context.Context, id string, config
99101
ForceSendFields: utils.FilterFields[catalog.UpdateMonitor](config.ForceSendFields),
100102
}
101103

104+
//nolint:staticcheck // Direct quality_monitor resource still uses legacy monitor endpoints; v1 data-quality migration is separate work.
102105
response, err := r.client.QualityMonitors.Update(ctx, updateRequest)
103106
if err != nil {
104107
return nil, err
@@ -108,6 +111,7 @@ func (r *ResourceQualityMonitor) DoUpdate(ctx context.Context, id string, config
108111
}
109112

110113
func (r *ResourceQualityMonitor) DoDelete(ctx context.Context, id string) error {
114+
//nolint:staticcheck // Direct quality_monitor resource still uses legacy monitor endpoints; v1 data-quality migration is separate work.
111115
_, err := r.client.QualityMonitors.Delete(ctx, catalog.DeleteQualityMonitorRequest{
112116
TableName: id,
113117
})

bundle/direct/dresources/type_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ var knownMissingInRemoteType = map[string][]string{
6464
"suspend_timeout_duration",
6565
},
6666
"postgres_projects": {
67+
"budget_policy_id",
68+
"custom_tags",
6769
"default_endpoint_settings",
6870
"display_name",
6971
"history_retention_duration",

0 commit comments

Comments
 (0)