Skip to content

Commit 74aa7a8

Browse files
committed
Upgrade Go SDK to 0.75.0
1 parent afc345f commit 74aa7a8

File tree

60 files changed

+2759
-699
lines changed

Some content is hidden

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

60 files changed

+2759
-699
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
033bcb9242b006001e2cf3956896711681de1a8c
1+
90fefb5618fdecf7dfdf6be7d56c2213d24ad944

.codegen/service.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func new{{.PascalName}}() *cobra.Command {
161161
{{else if .Entity.IsEmpty }}// TODO: output-only field
162162
{{else if .IsComputed -}}
163163
{{else if .IsOutputOnly -}}
164-
{{else if .Entity.Enum }}cmd.Flags().Var(&{{- template "request-body-obj" (dict "Method" $method "Field" .)}}, "{{.KebabName}}", `{{.Summary | without "`" | trimSuffix "."}}. Supported values: {{template "printArray" .Entity.Enum}}`)
164+
{{else if .Entity.Enum }}cmd.Flags().Var(&{{- template "request-body-obj" (dict "Method" $method "Field" .)}}, "{{.KebabName}}", `{{.Summary | without "`" | trimSuffix "."}}{{if .Summary}}. {{end}}Supported values: {{template "printArray" .Entity.Enum}}`)
165165
{{else}}cmd.Flags().{{template "arg-type" .Entity}}(&{{- template "request-body-obj" (dict "Method" $method "Field" .)}}, "{{.KebabName}}", {{- template "request-body-obj" (dict "Method" $method "Field" .)}}, `{{.Summary | without "`"}}`)
166166
{{end}}
167167
{{- end -}}

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,17 @@ cmd/workspace/dashboards/dashboards.go linguist-generated=true
7070
cmd/workspace/data-sources/data-sources.go linguist-generated=true
7171
cmd/workspace/database/database.go linguist-generated=true
7272
cmd/workspace/default-namespace/default-namespace.go linguist-generated=true
73+
cmd/workspace/default-warehouse-id/default-warehouse-id.go linguist-generated=true
7374
cmd/workspace/disable-legacy-access/disable-legacy-access.go linguist-generated=true
7475
cmd/workspace/disable-legacy-dbfs/disable-legacy-dbfs.go linguist-generated=true
7576
cmd/workspace/enable-export-notebook/enable-export-notebook.go linguist-generated=true
7677
cmd/workspace/enable-notebook-table-clipboard/enable-notebook-table-clipboard.go linguist-generated=true
7778
cmd/workspace/enable-results-downloading/enable-results-downloading.go linguist-generated=true
7879
cmd/workspace/enhanced-security-monitoring/enhanced-security-monitoring.go linguist-generated=true
7980
cmd/workspace/experiments/experiments.go linguist-generated=true
81+
cmd/workspace/external-lineage/external-lineage.go linguist-generated=true
8082
cmd/workspace/external-locations/external-locations.go linguist-generated=true
83+
cmd/workspace/external-metadata/external-metadata.go linguist-generated=true
8184
cmd/workspace/feature-store/feature-store.go linguist-generated=true
8285
cmd/workspace/forecasting/forecasting.go linguist-generated=true
8386
cmd/workspace/functions/functions.go linguist-generated=true
@@ -94,6 +97,7 @@ cmd/workspace/lakeview-embedded/lakeview-embedded.go linguist-generated=true
9497
cmd/workspace/lakeview/lakeview.go linguist-generated=true
9598
cmd/workspace/libraries/libraries.go linguist-generated=true
9699
cmd/workspace/llm-proxy-partner-powered-workspace/llm-proxy-partner-powered-workspace.go linguist-generated=true
100+
cmd/workspace/materialized-features/materialized-features.go linguist-generated=true
97101
cmd/workspace/metastores/metastores.go linguist-generated=true
98102
cmd/workspace/model-registry/model-registry.go linguist-generated=true
99103
cmd/workspace/model-versions/model-versions.go linguist-generated=true
@@ -130,6 +134,7 @@ cmd/workspace/resource-quotas/resource-quotas.go linguist-generated=true
130134
cmd/workspace/restrict-workspace-admins/restrict-workspace-admins.go linguist-generated=true
131135
cmd/workspace/schemas/schemas.go linguist-generated=true
132136
cmd/workspace/secrets/secrets.go linguist-generated=true
137+
cmd/workspace/service-principal-secrets-proxy/service-principal-secrets-proxy.go linguist-generated=true
133138
cmd/workspace/service-principals/service-principals.go linguist-generated=true
134139
cmd/workspace/serving-endpoints/serving-endpoints.go linguist-generated=true
135140
cmd/workspace/settings/settings.go linguist-generated=true

.github/workflows/tagging.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
concurrency:
1212
group: "tagging"
1313

14+
1415
jobs:
1516
tag:
1617
environment: "release-is"
@@ -46,5 +47,5 @@ jobs:
4647
env:
4748
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
4849
GITHUB_REPOSITORY: ${{ github.repository }}
49-
run: |-
50+
run: |
5051
python internal/genkit/tagging.py

bundle/config/variable/resolve_dashboard.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,37 @@ package variable
22

33
import (
44
"context"
5+
"fmt"
56

67
"github.com/databricks/databricks-sdk-go"
8+
"github.com/databricks/databricks-sdk-go/service/sql"
79
)
810

911
type resolveDashboard struct {
1012
name string
1113
}
1214

1315
func (l resolveDashboard) Resolve(ctx context.Context, w *databricks.WorkspaceClient) (string, error) {
14-
entity, err := w.Dashboards.GetByName(ctx, l.name)
16+
// List dashboards and find the one with the given name
17+
// If there are multiple dashboards with the same name, return an error
18+
dashboards, err := w.Dashboards.ListAll(ctx, sql.ListDashboardsRequest{})
1519
if err != nil {
1620
return "", err
1721
}
18-
return entity.Id, nil
22+
23+
dashboardMap := make(map[string][]sql.Dashboard)
24+
for _, dashboard := range dashboards {
25+
dashboardMap[dashboard.Name] = append(dashboardMap[dashboard.Name], dashboard)
26+
}
27+
28+
alternatives, ok := dashboardMap[l.name]
29+
if !ok || len(alternatives) == 0 {
30+
return "", fmt.Errorf("dashboard name '%s' does not exist", l.name)
31+
}
32+
if len(alternatives) > 1 {
33+
return "", fmt.Errorf("there are %d instances of dashboards named '%s'", len(alternatives), l.name)
34+
}
35+
return alternatives[0].Id, nil
1936
}
2037

2138
func (l resolveDashboard) String() string {

bundle/config/variable/resolve_dashboard_test.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/databricks/databricks-sdk-go/apierr"
87
"github.com/databricks/databricks-sdk-go/experimental/mocks"
98
"github.com/databricks/databricks-sdk-go/service/sql"
109
"github.com/stretchr/testify/assert"
@@ -17,9 +16,10 @@ func TestResolveDashboard_ResolveSuccess(t *testing.T) {
1716

1817
api := m.GetMockDashboardsAPI()
1918
api.EXPECT().
20-
GetByName(mock.Anything, "dashboard").
21-
Return(&sql.Dashboard{
22-
Id: "1234",
19+
ListAll(mock.Anything, mock.Anything).
20+
Return([]sql.Dashboard{
21+
{Id: "1234", Name: "dashboard"},
22+
{Id: "5678", Name: "dashboard2"},
2323
}, nil)
2424

2525
ctx := context.Background()
@@ -34,13 +34,16 @@ func TestResolveDashboard_ResolveNotFound(t *testing.T) {
3434

3535
api := m.GetMockDashboardsAPI()
3636
api.EXPECT().
37-
GetByName(mock.Anything, "dashboard").
38-
Return(nil, &apierr.APIError{StatusCode: 404})
37+
ListAll(mock.Anything, mock.Anything).
38+
Return([]sql.Dashboard{
39+
{Id: "1234", Name: "dashboard1"},
40+
{Id: "5678", Name: "dashboard2"},
41+
}, nil)
3942

4043
ctx := context.Background()
4144
l := resolveDashboard{name: "dashboard"}
4245
_, err := l.Resolve(ctx, m.WorkspaceClient)
43-
require.ErrorIs(t, err, apierr.ErrNotFound)
46+
require.ErrorContains(t, err, "dashboard name 'dashboard' does not exist")
4447
}
4548

4649
func TestResolveDashboard_String(t *testing.T) {

bundle/internal/schema/annotations.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ github.com/databricks/cli/bundle/config/resources.AppPermission:
436436
"user_name":
437437
"description": |-
438438
PLACEHOLDER
439+
github.com/databricks/cli/bundle/config/resources.Cluster:
440+
"runtime_engine":
441+
"description": |-
442+
PLACEHOLDER
439443
github.com/databricks/cli/bundle/config/resources.ClusterPermission:
440444
"group_name":
441445
"description": |-
@@ -449,6 +453,10 @@ github.com/databricks/cli/bundle/config/resources.ClusterPermission:
449453
"user_name":
450454
"description": |-
451455
PLACEHOLDER
456+
github.com/databricks/cli/bundle/config/resources.Dashboard:
457+
"lifecycle_state":
458+
"description": |-
459+
PLACEHOLDER
452460
github.com/databricks/cli/bundle/config/resources.DashboardPermission:
453461
"group_name":
454462
"description": |-

bundle/internal/schema/annotations_openapi.yml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ github.com/databricks/cli/bundle/config/resources.Job:
365365
The queue settings of the job.
366366
"run_as":
367367
"description": |-
368-
Write-only setting. Specifies the user or service principal that the job runs as. If not specified, the job runs as the user who created the job.
369-
370-
Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown.
368+
The user or service principal that the job runs as, if specified in the request.
369+
This field indicates the explicit configuration of `run_as` for the job.
370+
To find the value in all cases, explicit or implicit, use `run_as_user_name`.
371371
"schedule":
372372
"description": |-
373373
An optional periodic schedule for this job. The default behavior is that the job only runs when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`.
@@ -434,6 +434,7 @@ github.com/databricks/cli/bundle/config/resources.ModelServingEndpoint:
434434
"config":
435435
"description": |-
436436
The core config of the serving endpoint.
437+
"description": {}
437438
"name":
438439
"description": |-
439440
The name of the serving endpoint. This field is required and must be unique across a Databricks workspace.
@@ -486,8 +487,6 @@ github.com/databricks/cli/bundle/config/resources.Pipeline:
486487
"environment":
487488
"description": |-
488489
Environment specification for this pipeline used to install dependencies.
489-
"x-databricks-preview": |-
490-
PRIVATE
491490
"event_log":
492491
"description": |-
493492
Event log configuration for this pipeline
@@ -527,8 +526,6 @@ github.com/databricks/cli/bundle/config/resources.Pipeline:
527526
Root path for this pipeline.
528527
This is used as the root directory when editing the pipeline in the Databricks user interface and it is
529528
added to sys.path when executing Python sources during pipeline execution.
530-
"x-databricks-preview": |-
531-
PRIVATE
532529
"run_as":
533530
"description": |-
534531
Write-only setting, available only in Create/Update calls. Specifies the user or service principal that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline.
@@ -718,6 +715,7 @@ github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentStatus:
718715
"description": |-
719716
State of the deployment.
720717
github.com/databricks/databricks-sdk-go/service/apps.AppResource:
718+
"database": {}
721719
"description":
722720
"description": |-
723721
Description of the App Resource.
@@ -729,6 +727,15 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResource:
729727
"serving_endpoint": {}
730728
"sql_warehouse": {}
731729
"uc_securable": {}
730+
github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase:
731+
"database_name": {}
732+
"instance_name": {}
733+
"permission": {}
734+
github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabaseDatabasePermission:
735+
"_":
736+
"enum":
737+
- |-
738+
CAN_CONNECT_AND_CREATE
732739
github.com/databricks/databricks-sdk-go/service/apps.AppResourceJob:
733740
"id":
734741
"description": |-
@@ -2790,6 +2797,9 @@ github.com/databricks/databricks-sdk-go/service/ml.ExperimentTag:
27902797
"description": |-
27912798
The tag value.
27922799
github.com/databricks/databricks-sdk-go/service/ml.ModelTag:
2800+
"_":
2801+
"description": |-
2802+
Tag for a registered model
27932803
"key":
27942804
"description": |-
27952805
The tag key.
@@ -2910,6 +2920,8 @@ github.com/databricks/databricks-sdk-go/service/pipelines.IngestionSourceType:
29102920
SQLSERVER
29112921
- |-
29122922
SALESFORCE
2923+
- |-
2924+
BIGQUERY
29132925
- |-
29142926
NETSUITE
29152927
- |-
@@ -2928,6 +2940,8 @@ github.com/databricks/databricks-sdk-go/service/pipelines.IngestionSourceType:
29282940
SHAREPOINT
29292941
- |-
29302942
DYNAMICS365
2943+
- |-
2944+
CONFLUENCE
29312945
github.com/databricks/databricks-sdk-go/service/pipelines.ManualTrigger: {}
29322946
github.com/databricks/databricks-sdk-go/service/pipelines.NotebookLibrary:
29332947
"path":
@@ -3092,8 +3106,6 @@ github.com/databricks/databricks-sdk-go/service/pipelines.PipelineLibrary:
30923106
The unified field to include source codes.
30933107
Each entry can be a notebook path, a file path, or a folder path that ends `/**`.
30943108
This field cannot be used together with `notebook` or `file`.
3095-
"x-databricks-preview": |-
3096-
PRIVATE
30973109
"jar":
30983110
"description": |-
30993111
URI of the jar to be installed. Currently only DBFS is supported.
@@ -3243,6 +3255,8 @@ github.com/databricks/databricks-sdk-go/service/pipelines.TableSpecificConfigScd
32433255
SCD_TYPE_1
32443256
- |-
32453257
SCD_TYPE_2
3258+
- |-
3259+
APPEND_ONLY
32463260
github.com/databricks/databricks-sdk-go/service/serving.Ai21LabsConfig:
32473261
"ai21labs_api_key":
32483262
"description": |-
@@ -3280,6 +3294,8 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailParame
32803294
"description": |-
32813295
List of invalid keywords.
32823296
AI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content.
3297+
"deprecation_message": |-
3298+
This field is deprecated
32833299
"pii":
32843300
"description": |-
32853301
Configuration for guardrail PII filter.
@@ -3290,6 +3306,8 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailParame
32903306
"description": |-
32913307
The list of allowed topics.
32923308
Given a chat request, this guardrail flags the request if its topic is not in the allowed topics.
3309+
"deprecation_message": |-
3310+
This field is deprecated
32933311
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehavior:
32943312
"behavior":
32953313
"description": |-
@@ -3330,8 +3348,11 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimit:
33303348
Used to specify how many calls are allowed for a key within the renewal_period.
33313349
"key":
33323350
"description": |-
3333-
Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported,
3351+
Key field for a rate limit. Currently, 'user', 'user_group, 'service_principal', and 'endpoint' are supported,
33343352
with 'endpoint' being the default if not specified.
3353+
"principal":
3354+
"description": |-
3355+
Principal field for a user, user group, or service principal to apply rate limiting to. Accepts a user email, group name, or service principal application ID.
33353356
"renewal_period":
33363357
"description": |-
33373358
Renewal period field for a rate limit. Currently, only 'minute' is supported.
@@ -3342,6 +3363,10 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitKey:
33423363
user
33433364
- |-
33443365
endpoint
3366+
- |-
3367+
user_group
3368+
- |-
3369+
service_principal
33453370
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitRenewalPeriod:
33463371
"_":
33473372
"enum":
@@ -3728,6 +3753,7 @@ github.com/databricks/databricks-sdk-go/service/serving.RateLimitRenewalPeriod:
37283753
- |-
37293754
minute
37303755
github.com/databricks/databricks-sdk-go/service/serving.Route:
3756+
"served_entity_name": {}
37313757
"served_model_name":
37323758
"description": |-
37333759
The name of the served model this route configures traffic for.
@@ -3846,6 +3872,9 @@ github.com/databricks/databricks-sdk-go/service/serving.TrafficConfig:
38463872
"description": |-
38473873
The list of routes that define traffic to each served entity.
38483874
github.com/databricks/databricks-sdk-go/service/workspace.AzureKeyVaultSecretScopeMetadata:
3875+
"_":
3876+
"description": |-
3877+
The metadata of the Azure KeyVault for a secret scope of type `AZURE_KEYVAULT`
38493878
"dns_name":
38503879
"description": |-
38513880
The DNS of the KeyVault
@@ -3854,6 +3883,9 @@ github.com/databricks/databricks-sdk-go/service/workspace.AzureKeyVaultSecretSco
38543883
The resource id of the azure KeyVault that user wants to associate the scope with.
38553884
github.com/databricks/databricks-sdk-go/service/workspace.ScopeBackendType:
38563885
"_":
3886+
"description": |-
3887+
The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes
3888+
will be supported in a later release.
38573889
"enum":
38583890
- |-
38593891
DATABRICKS

bundle/internal/schema/annotations_openapi_overrides.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ github.com/databricks/cli/bundle/config/resources.ModelServingEndpoint:
254254
- key: "team"
255255
value: "data science"
256256
```
257+
"description":
258+
"description": |-
259+
PLACEHOLDER
257260
"permissions":
258261
"description": |-
259262
PLACEHOLDER
@@ -493,6 +496,9 @@ github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentStatus:
493496
"description": |-
494497
PLACEHOLDER
495498
github.com/databricks/databricks-sdk-go/service/apps.AppResource:
499+
"database":
500+
"description": |-
501+
PLACEHOLDER
496502
"job":
497503
"description": |-
498504
PLACEHOLDER
@@ -508,6 +514,16 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResource:
508514
"uc_securable":
509515
"description": |-
510516
PLACEHOLDER
517+
github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase:
518+
"database_name":
519+
"description": |-
520+
PLACEHOLDER
521+
"instance_name":
522+
"description": |-
523+
PLACEHOLDER
524+
"permission":
525+
"description": |-
526+
PLACEHOLDER
511527
github.com/databricks/databricks-sdk-go/service/apps.AppResourceJob:
512528
"id":
513529
"description": |-
@@ -700,6 +716,10 @@ github.com/databricks/databricks-sdk-go/service/pipelines.PipelineTrigger:
700716
"manual":
701717
"description": |-
702718
PLACEHOLDER
719+
github.com/databricks/databricks-sdk-go/service/serving.Route:
720+
"served_entity_name":
721+
"description": |-
722+
PLACEHOLDER
703723
github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput:
704724
"entity_version":
705725
"description": |-

0 commit comments

Comments
 (0)