Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen/_openapi_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e2018bb00cba203508f8afe5a6d41bd49789ba25
59c4c0f3d5f0ef00cd5350b5674e941a7606d91a
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### CLI

### Dependency updates
* Upgrade Go SDK to 0.91.0

### Bundles
* Update templates to use serverless environment version 4 and matching Python version ([#3897](https://github.com/databricks/cli/pull/3897))
Expand Down
18 changes: 17 additions & 1 deletion bundle/internal/schema/annotations_openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3176,7 +3176,9 @@ github.com/databricks/databricks-sdk-go/service/jobs.Source:
github.com/databricks/databricks-sdk-go/service/jobs.SparkJarTask:
"jar_uri":
"description": |-
Deprecated since 04/2016. Provide a `jar` through the `libraries` field instead. For an example, see :method:jobs/create.
Deprecated since 04/2016. For classic compute, provide a `jar` through the `libraries` field instead. For serverless compute, provide a `jar` though the `java_dependencies` field inside the `environments` list.

See the examples of classic and serverless compute usage at the top of the page.
"deprecation_message": |-
This field is deprecated
"main_class_name":
Expand Down Expand Up @@ -3791,6 +3793,20 @@ github.com/databricks/databricks-sdk-go/service/pipelines.IngestionSourceType:
CONFLUENCE
- |-
META_MARKETING
- |-
GOOGLE_ADS
- |-
TIKTOK_ADS
- |-
SALESFORCE_MARKETING_CLOUD
- |-
HUBSPOT
- |-
WORKDAY_HCM
- |-
GUIDEWIRE
- |-
ZENDESK
- |-
FOREIGN_CATALOG
github.com/databricks/databricks-sdk-go/service/pipelines.ManualTrigger: {}
Expand Down
4 changes: 4 additions & 0 deletions bundle/internal/schema/annotations_openapi_overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,10 @@ github.com/databricks/cli/bundle/config/resources.SqlWarehousePermissionLevel:
CAN_MONITOR
- |-
CAN_VIEW
github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable:
"lifecycle":
"description": |-
PLACEHOLDER
github.com/databricks/cli/bundle/config/resources.Volume:
"_":
"markdown_description": |-
Expand Down
2 changes: 1 addition & 1 deletion bundle/internal/validation/generated/enum_fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion bundle/schema/jsonschema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/account/groups-v2/groups-v2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/account/iam-v2/iam-v2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/account/ip-access-lists/ip-access-lists.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/account/log-delivery/log-delivery.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/account/private-access/private-access.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/account/usage-dashboards/usage-dashboards.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/account/users-v2/users-v2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions cmd/account/workspaces/workspaces.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmd/auth/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func setHostAndAccountId(ctx context.Context, existingProfile *profile.Profile,

// If the account-id was not provided as a cmd line flag, try to read it from
// the specified profile.
//nolint:staticcheck // SA1019: IsAccountClient is deprecated but is still used here to avoid breaking changes
isAccountClient := (&config.Config{Host: authArguments.Host}).IsAccountClient()
accountID := authArguments.AccountID
if isAccountClient && accountID == "" {
Expand Down
1 change: 1 addition & 0 deletions cmd/auth/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (c *profileMetadata) Load(ctx context.Context, configFilePath string, skipV
return
}

//nolint:staticcheck // SA1019: IsAccountClient is deprecated but is still used here to avoid breaking changes
if cfg.IsAccountClient() {
a, err := databricks.NewAccountClient((*databricks.Config)(cfg))
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions cmd/auth/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ func (m *MockApiClient) GetWorkspaceOAuthEndpoints(ctx context.Context, workspac
}, nil
}

// GetUnifiedOAuthEndpoints implements u2m.OAuthEndpointSupplier.
func (m *MockApiClient) GetUnifiedOAuthEndpoints(ctx context.Context, host, accountId string) (*u2m.OAuthAuthorizationServer, error) {
return &u2m.OAuthAuthorizationServer{
TokenEndpoint: host + "/token",
AuthorizationEndpoint: host + "/authorize",
}, nil
}

var _ u2m.OAuthEndpointSupplier = (*MockApiClient)(nil)

func TestToken_loadToken(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions cmd/labs/project/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ func (e *Entrypoint) validLogin(cmd *cobra.Command) (*config.Config, error) {
// an account profile during installation (anymore) and just prompt for it, when context
// does require it. This also means that we always prompt for account-level commands, unless
// users specify a `--profile` flag.
//nolint:staticcheck // SA1019: IsAccountClient is deprecated but is still used here to avoid breaking changes
isACC := cfg.IsAccountClient()
if e.IsAccountLevel && cfg.Profile == "" {
if !cmdio.IsPromptSupported(ctx) {
Expand Down
1 change: 1 addition & 0 deletions cmd/labs/project/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func (i *installer) login(ctx context.Context) (*databricks.WorkspaceClient, err
} else if err != nil {
return nil, fmt.Errorf("valid: %w", err)
}
//nolint:staticcheck // SA1019: IsAccountClient is deprecated but is still used here to avoid breaking changes
if !i.HasAccountLevelCommands() && cfg.IsAccountClient() {
return nil, errors.New("got account-level client, but no account-level commands")
}
Expand Down
1 change: 1 addition & 0 deletions cmd/labs/project/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type loginConfig struct {
}

func (lc *loginConfig) askWorkspace(ctx context.Context, cfg *config.Config) (*databricks.WorkspaceClient, error) {
//nolint:staticcheck // SA1019: IsAccountClient is deprecated but is still used here to avoid breaking changes
if cfg.IsAccountClient() {
return nil, nil
}
Expand Down
Loading