Skip to content

[Internal] Merge main in dev/sdk-mod #1138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 54 commits into from
Closed

[Internal] Merge main in dev/sdk-mod #1138

wants to merge 54 commits into from

Conversation

parthban-db
Copy link
Contributor

What changes are proposed in this pull request?

How is this tested?

Existing Tests.

parthban-db and others added 23 commits January 13, 2025 09:58
### Internal Changes

* Bump staticcheck to 0.5.1 and add go 1.23 test coverage
([#1106](#1106)).
* Bump x/net, x/crypto dependencies
([#1107](#1107)).
* Create custom codeql.yml
([#1114](#1114)).
* Decouple serving and oauth2 package
([#1110](#1110)).
* Migrate workflows that need write access to use hosted runners
([#1112](#1112)).
* Move package credentials in config
([#1115](#1115)).
* Update Queries test
([#1104](#1104)).


### API Changes:

* Added `NoCompute` field for
[apps.CreateAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#CreateAppRequest).
* Added `HasMore` field for
[jobs.BaseJob](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#BaseJob).
* Added `HasMore` field for
[jobs.BaseRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#BaseRun).
* Added `PageToken` field for
[jobs.GetJobRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#GetJobRequest).
* Added `HasMore` and `NextPageToken` fields for
[jobs.Job](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Job).
* Added `HasMore` field for
[jobs.Run](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Run).
* Added `RunAs` field for
[pipelines.CreatePipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#CreatePipeline).
* Added `RunAs` field for
[pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline).
* Added `AuthorizationDetails` and `EndpointUrl` fields for
[serving.DataPlaneInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DataPlaneInfo).
* [Breaking] Changed `Update` method for
[a.AccountFederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#AccountFederationPolicyAPI)
account-level service with new required argument order.
* [Breaking] Changed `Update` method for
[a.ServicePrincipalFederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ServicePrincipalFederationPolicyAPI)
account-level service with new required argument order.
* Changed `UpdateMask` field for
[oauth2.UpdateAccountFederationPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateAccountFederationPolicyRequest)
to no longer be required.
* Changed `UpdateMask` field for
[oauth2.UpdateServicePrincipalFederationPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateServicePrincipalFederationPolicyRequest)
to no longer be required.
* [Breaking] Changed `DaysOfWeek` field for
[pipelines.RestartWindow](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#RestartWindow)
to type
[pipelines.DayOfWeekList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#DayOfWeekList).

OpenAPI SHA: 779817ed8d63031f5ea761fbd25ee84f38feec0d, Date: 2025-01-08
…pace test (#1120)

## What changes are proposed in this pull request?
What - The PR modifies the scope of directory traversal in the recursive
list test. It limits the search to the ".sdk" directory, where the
relevant notebook is created.

Why - The test was previously hitting API rate limits because it was
scanning too many elements in the current traversing directory. By
narrowing the scope to the ".sdk" directory, the test can now run more
efficiently without encountering these limits.

## How is this tested?
This is itself an integration test.
## What changes are proposed in this pull request?
This PR deletes the `examples/mocking` directory as it is no longer
maintained. This mocker example is built on the assumption that every
`service` has `WithImpl()` that is used to set the stubs for every
`service`. But this is no longer the case. This mocker is not even able
to compile.

## How is this tested?
N/A
## What changes are proposed in this pull request?
Support Query parameters for all HTTP operations. Previously, only
GET/HEAD/DELETE were supported.

## How is this tested?
* Added Unit Tests
* Run Integration Tests
## What changes are proposed in this pull request?
This PR introduces a download target which is a wrapper around `go mod
download`. The rationale behind introducing this target is that we can
change the underlying implementation of this target for `dev/sdk-mod`
branch in which there is no go.mod at the root repository so we need to
either manually run download for all the go modules or introduce a make
target like
[this](https://github.com/databricks/databricks-sdk-go/pull/1123/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52).
One could say that we can just add this target for SDK mod but we need
to update integration test workflows accordingly. I think this is a
better way than having an if/else statement in the workflow.

## How is this tested?
Locally run `make download`
### Bug Fixes

* Support Query parameters for all HTTP operations
([#1124](#1124)).


### Internal Changes

* Add download target to MakeFile
([#1125](#1125)).
* Delete examples/mocking module
([#1126](#1126)).
* Scope the traversing directory in the Recursive list workspace test
([#1120](#1120)).


### API Changes:
* Added
[w.AccessControl](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#AccessControlAPI)
workspace-level service.
* Added `HttpRequest` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service.
* Added `ReviewState`, `Reviews` and `RunnerCollaborators` fields for
[cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook).
* Added `CleanRoomsNotebookOutput` field for
[jobs.RunOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunOutput).
* Added `RunAsRepl` field for
[jobs.SparkJarTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SparkJarTask).
* Added `Scopes` field for
[oauth2.UpdateCustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateCustomAppIntegration).
* Added `Contents` field for
[serving.GetOpenApiResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetOpenApiResponse).
* Added `Activated`, `ActivationUrl`, `AuthenticationType`, `Cloud`,
`Comment`, `CreatedAt`, `CreatedBy`, `DataRecipientGlobalMetastoreId`,
`IpAccessList`, `MetastoreId`, `Name`, `Owner`, `PropertiesKvpairs`,
`Region`, `SharingCode`, `Tokens`, `UpdatedAt` and `UpdatedBy` fields
for
[sharing.RecipientInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientInfo).
* Added `ExpirationTime` field for
[sharing.RecipientInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientInfo).
* Added `Pending` enum value for
[cleanrooms.CleanRoomAssetStatusEnum](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetStatusEnum).
* Added `AddNodesFailed`, `AutomaticClusterUpdate`, `AutoscalingBackoff`
and `AutoscalingFailed` enum values for
[compute.EventType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#EventType).
* Added `PendingWarehouse` enum value for
[dashboards.MessageStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageStatus).
* Added `Cpu`, `GpuLarge`, `GpuMedium`, `GpuSmall` and `MultigpuMedium`
enum values for
[serving.ServingModelWorkloadType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingModelWorkloadType).
* Changed `Update` method for
[w.Recipients](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientsAPI)
workspace-level service to return
[sharing.RecipientInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientInfo).
* Changed `Update` method for
[w.Recipients](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientsAPI)
workspace-level service return type to become non-empty.
* Changed `Update` method for
[w.Recipients](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientsAPI)
workspace-level service to type `Update` method for
[w.Recipients](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientsAPI)
workspace-level service.
* Changed `Create` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service with new required argument order.
* Changed `GetOpenApi` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service return type to become non-empty.
* Changed `Patch` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service to type `Patch` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service.
* Changed `Patch` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service to return
[serving.EndpointTags](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#EndpointTags).
* Changed
[serving.EndpointTagList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#EndpointTagList)
to.
* Changed `CollaboratorAlias` field for
[cleanrooms.CleanRoomCollaborator](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomCollaborator)
to be required.
* Changed `CollaboratorAlias` field for
[cleanrooms.CleanRoomCollaborator](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomCollaborator)
to be required.
* Changed `Behavior` field for
[serving.AiGatewayGuardrailPiiBehavior](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AiGatewayGuardrailPiiBehavior)
to no longer be required.
* Changed `Behavior` field for
[serving.AiGatewayGuardrailPiiBehavior](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AiGatewayGuardrailPiiBehavior)
to no longer be required.
* Changed `Config` field for
[serving.CreateServingEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CreateServingEndpoint)
to no longer be required.
* Changed `ProjectId` and `Region` fields for
[serving.GoogleCloudVertexAiConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GoogleCloudVertexAiConfig)
to be required.
* Changed `ProjectId` and `Region` fields for
[serving.GoogleCloudVertexAiConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GoogleCloudVertexAiConfig)
to be required.
* Changed `WorkloadType` field for
[serving.ServedEntityInput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServedEntityInput)
to type
[serving.ServingModelWorkloadType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingModelWorkloadType).
* Changed `WorkloadType` field for
[serving.ServedEntityOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServedEntityOutput)
to type
[serving.ServingModelWorkloadType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingModelWorkloadType).
* Changed `WorkloadType` field for
[serving.ServedModelOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServedModelOutput)
to type
[serving.ServingModelWorkloadType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingModelWorkloadType).
* Changed waiter for
[ServingEndpointsAPI.Create](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI.Create).
* Changed waiter for
[ServingEndpointsAPI.UpdateConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI.UpdateConfig).

OpenAPI SHA: 0be1b914249781b5e903b7676fd02255755bc851, Date: 2025-01-22
## What changes are proposed in this pull request?

#1124 fixed the handling of APIs that use query parameters and a body
simultaneously. After that change, query parameters are always sent,
even if set to the zero value.

This PR addresses this, using the same logic for query parameters as for
fields in the body: if a field is set to its zero value, it will be
included in the query parameter if it is present in ForceSendFields.

## How is this tested?

This behavior is dependend upon in the Terraform provider. I'll be using
it in
databricks/terraform-provider-databricks#4430
and verifying that there is no behavior change in the generated request.

When using this PR in Terraform, tests asserting that the path doesn't
include query parameters pass.
### Bug Fixes

* Do not send query parameters when set to zero value
([#1136](#1136)).
## What changes are proposed in this pull request?

This PR aims at eliminating long-tail latency due to OAuth token
refreshes in scenarios where a single client is responsible for a
relatively high (e.g. > 1 QPS) continuous outbound traffic. The feature
is disabled by default — which arguably makes this PR a functional
no-op.

Precisely, the PR introduces a new token cache which attempts to always
keep its token fresh by asynchronously refreshing the token before it
expires. We differentiate three token states:

- `fresh`: The token is valid and is not close to its expiration.
- `stale`: The token is valid but will expire soon.
- `expired`: The token has expired and cannot be used.

Each time a request tries to access the token, we do the following:

- If the token is `fresh`, return the current token;
- If the token is `stale`, trigger an asynchronous refresh and return
the current token;
- If the token is `expired`, make a blocking refresh call to update the
token and return it.

In particular, asynchronous refreshes use a lock to guarantee that there
can only be one pending refresh at a given time.

The performance of the algorithm depends on the length of the `stale`
and `fresh` periods. On the first hand, the `stale` period must be long
enough to prevent tokens from entering the expired state. On the other
hand, a long `stale` period reduces the length of the `fresh` period,
thus increasing the refresh frequency.

Right now, the `stale` period is configured to 3 minutes by default
(i.e. 5% of the expected token lifespan of 1 hour). This value might be
changed in the future to guarantee that the default behavior achieves
the best performance for the majority of users.

**For reviewers:** 

- This PR only uses the new cache in control-plane auth flows; I plan to
send a follow-up PR to enable asynchronous refresh in data-plane flows
once this one has been merged.
- Interface `oauth2.TokenSource` is likely not sufficient for us and we
would need one with a `Token` method that takes a `context.Context` as
parameter: `Token(context.Context) (Token, error)`.

## How is this tested?

Complete test coverage with a focus on various concurrency scenarios.
### New Features and Improvements

* Add support for async OAuth token refreshes
([#1135](#1135)).


### API Changes:

* Added
[a.BudgetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetPolicyAPI)
account-level service.
* Added
[a.EnableIpAccessLists](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EnableIpAccessListsAPI)
account-level service.
* Added
[w.LakeviewEmbedded](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#LakeviewEmbeddedAPI)
workspace-level service and
[w.QueryExecution](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#QueryExecutionAPI)
workspace-level service.
* Added
[w.RedashConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#RedashConfigAPI)
workspace-level service.
* Added `GcpOauthToken` field for
[catalog.TemporaryCredentials](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#TemporaryCredentials).
* Added `Options` field for
[catalog.UpdateCatalog](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateCatalog).
* Added `StatementId` field for
[dashboards.QueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#QueryAttachment).
* Added `EffectivePerformanceTarget` field for
[jobs.BaseRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#BaseRun).
* Added `PerformanceTarget` field for
[jobs.CreateJob](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJob).
* Added `PerformanceTarget` field for
[jobs.JobSettings](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobSettings).
* Added `EffectivePerformanceTarget` field for
[jobs.Run](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Run).
* Added `PerformanceTarget` field for
[jobs.RunNow](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunNow).
* Added `Disabled` and `EffectivePerformanceTarget` fields for
[jobs.RunTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunTask).
* Added `UserAuthorizedScopes` field for
[oauth2.CreateCustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CreateCustomAppIntegration).
* Added `UserAuthorizedScopes` field for
[oauth2.GetCustomAppIntegrationOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#GetCustomAppIntegrationOutput).
* Added `UserAuthorizedScopes` field for
[oauth2.UpdateCustomAppIntegration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateCustomAppIntegration).
* Added `Contents` field for
[serving.HttpRequestResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#HttpRequestResponse).
* Changed `HttpRequest` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service to type `HttpRequest` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service.
* Changed `HttpRequest` method for
[w.ServingEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsAPI)
workspace-level service to return
[serving.HttpRequestResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#HttpRequestResponse).
* Removed `SecurableKind` field for
[catalog.CatalogInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogInfo).
* Removed `SecurableKind` field for
[catalog.ConnectionInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ConnectionInfo).
* Removed `StatusCode` and `Text` fields for
[serving.ExternalFunctionResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ExternalFunctionResponse).

OpenAPI SHA: c72c58f97b950fcb924a90ef164bcb10cfcd5ece, Date: 2025-02-03
…Context` (#1141)

## What changes are proposed in this pull request?

This PR adds a new `TokenSource` interface which is essentially the same
as `oauth2.TokenSource` but takes a `context.Context` as input.

The rationale behind this interface is that many of the SDK
`TokenSource` end-up making network calls under the hood. We want these
to be done passing the context of the calling method.

This interface is meant to ultimately entirely replace the use of
`oauth2.TokenSource` in the SDK.

## How is this tested?

Simple unit tests.
…1142)

DO NOT MERGE: `api.go` and `impl.go` are here to help with review and
will be removed before merge. These are supposed to be added later on
via code generation.

## What changes are proposed in this pull request?

This PR is a step towards enabling asynchronous refreshes of data plane
tokens.

The PR introduces a new interface `dataplane.EndpointTokenSource` which
returns data plane tokens for a given endpoint and authorization detail.
The default implementation relies on `auth.NewCachedTokenSource` to wrap
the underlying TokenSources.

Note: async refreshes are disabled at the moment and will be enabled in
a follow-up PR.

**About Config.GetTokenSource():**

My first attempt to implement `GetTokenSource()` returned an error if
the `TokenSource` could not be built (e.g. because of config
initialization errors). This didn't work because:

1. service constructors do not return errors and thus had to panic;
2. service constructors are called systematically as soon as the
`WorkspaceClient` is created — sometimes with a config that is not
compatible with `GetTokenSource()`.

Returning a `TokenSource` provider instead of a `TokenSource` would have
solved the problem but did not feel right. The current solution (i.e.
return an ever-failing token source) is the cleanest solution I could
think off.

## How is this tested?

Complete unit test coverage of the new package.
## What changes are proposed in this pull request?

This PR enables async refreshes for cached token sources. 

This PR also: 

- Fixes a race condition bug in the unit tests by adding a small delay
to the test refresh.
- Remove one test in AzureCLI that is not correct anymore due to how the
code is structured. Refactoring this to guarantee that the test pass is
not trivial and ultimately out of the scope of the new system — as the
cached token source is the one providing the guarantee.

## How is this tested?

Fix unit tests.
### New Features and Improvements

* Enable async refreshes for OAuth tokens
([#1143](#1143)).


### Internal Changes

* Add support for asynchronous data plane token refreshes
([#1142](#1142)).
* Introduce new TokenSource interface that takes a `context.Context`
([#1141](#1141)).


### API Changes:

* Added `GetMessageQueryResultByAttachment` method for
[w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI)
workspace-level service.
* Added `Id` field for
[apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
* Added `LimitConfig` field for
[billing.UpdateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetPolicyRequest).
* Added `Volumes` field for
[compute.ClusterLogConf](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterLogConf).
* [Breaking] Removed `ReviewState`, `Reviews` and `RunnerCollaborators`
fields for
[cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook).

OpenAPI SHA: 99f644e72261ef5ecf8d74db20f4b7a1e09723cc, Date: 2025-02-11
### Internal Changes

* Do not send ForceSendFields as query parameters.
## What changes are proposed in this pull request?

The existing code only paginates tasks and iterations. With this PR we
update the logic to also paginate job_clusters, job_parameters and
repair_history. This changes are needed for [Jobs API
2.2](https://docs.databricks.com/api/workspace/jobs/getrun)
compatibility.

## How is this tested?

I enabled API 2.2 calls by modifying URL string `/api/2.2/jobs/runs/get`
in service/jobs/impl.go. Then I ran unit test from
service/jobs/ext_api_test.go
## What changes are proposed in this pull request?

Introduces logic in extension for jobs GetJob call that paginates tasks
and other arrays in the response. This change is necessary for SDK and
API 2.2 compatibility. API 2.2 serves paginated responses as long as
next_page_token field is present in the response. The pagination logic
is not exposed to the customer.

## How is this tested?

I enabled API 2.2 calls by modifying URL string /api/2.2/jobs/get in
service/jobs/impl.go. Then I ran unit test from
service/jobs/ext_api_test.go
## What changes are proposed in this pull request?

Enable Automated Tagging for SDK to support faster releases.

## How is this tested?

Automated Tagging process has been already enabled in
`terraform-provider-databricks` repository.
…#1150)

## What changes are proposed in this pull request?

Introduces logic in the extension for jobs ListJobs call. The extended
logic accounts for the new response format of API 2.2. API 2.1 format
returns all tasks and job_cluster for each job in the jobs list. API 2.2
format truncates tasks and job_cluster to 100 elements. The extended
ListJobs logic calls GetJob for each job in the list to populate the
full list of tasks and job_clusters.

I added logic that reads jobs from the list and produces custom iterator
struct `expandedJobsIterator` that is supposed to mimic python
generators. The goal is to only read necessary elements from the API
endpoint and not more.

## How is this tested?

Unit tests and manual tests. Manual tests were done in two modes: using
API 2.2 and using API 2.1. So this code is compatible with both API
versions.
…shalling error (#1153)

## What changes are proposed in this pull request?

This PR refactors how `APIError` processes error details to fully
support the Databricks Error specification. In particular, it provides a
clear mechanism to access known error details types while still enabling
users to access unknown error details.

The core of the PR is the addition of a new `ErrorDetails` type which
operates as the union of all error details type. It implements the fact
that an error response should only contain at most _one instance of each
type_.

The code is purposely structured to hide implementation details by (i)
exposing `ErrorDetails` via a function, and (ii) separating the exported
error details types from their unmarshalling logic.

## How is this tested?

100% unit tests coverage of new code + slight refactor of the test
suite.
…rors (#1155)

## What changes are proposed in this pull request?

in #769, `poll.Simple` method was added to simplify mocking of waiter
objects. However, this only allows testing of happy path where no error
is returned.

This PR adds the equivalent `poll.SimpleError` method to returns an
error instead.

## How is this tested?
- [x] Unit test added
…onses (#1151)

## What changes are proposed in this pull request?

Introduces logic in the extension for jobs ListRuns call. The extended
logic accounts for the new response format of API 2.2. API 2.1 format
returns all tasks and job_cluster for each run in the runs list. API 2.2
format truncates tasks and job_cluster to 100 elements. The extended
ListRuns logic calls GetRun for each run in the list to populate the
full list of tasks and job_clusters.

I added logic that reads runs from the list and produces custom iterator
struct `expandedRunsIterator` that is supposed to mimic python
generators. The goal is to only read necessary elements from the API
endpoint and not more.

## How is this tested?

Unit tests and manual tests. Manual tests were done in two modes: using
API 2.2 and using API 2.1. So this code is compatible with both API
versions.

---------

Co-authored-by: Renaud Hartert <renaud.hartert@databricks.com>
## What changes are proposed in this pull request?

Update OpenAPI spec

## How is this tested?

N/A
deco-sdk-tagging bot and others added 4 commits March 3, 2025 15:48
## Release v0.59.0

### Bug Fixes

* Fix unlikely issue due to conflicting error details in `APIError`.

### Internal Changes

* Update Jobs ListRuns API to support paginated responses ([#1151](#1151))
* Add `poll.SimpleError` to mock waiter objects returning errors  ([#1155](#1155))
* Refactor `APIError` to expose different types of error details ([#1153](#1153)). 
* Update Jobs ListJobs API to support paginated responses ([#1150](#1150))
* Introduce automated tagging ([#1148](#1148)).
* Update Jobs GetJob API to support paginated responses  ([#1133](#1133)).
* Update Jobs GetRun API to support paginated responses  ([#1132](#1132)).

### API Changes
* Added `GetSpace` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
* Added `ListProviderShareAssets` method for [w.Providers](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ProvidersAPI) workspace-level service.
* Added `BudgetPolicyId` and `EffectiveBudgetPolicyId` fields for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
* Added `Policy` field for [billing.CreateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetPolicyRequest).
* Added `DatabricksGcpServiceAccount` field for [catalog.ValidateCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ValidateCredentialRequest).
* Added `AttachmentId` field for [dashboards.GenieAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAttachment).
* Added `ConversationId` field for [dashboards.GenieConversation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieConversation).
* Added `MessageId` field for [dashboards.GenieMessage](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieMessage).
* Added `Description`, `Id`, `LastUpdatedTimestamp`, `Query`, `QueryResultMetadata` and `Title` fields for [dashboards.GenieQueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieQueryAttachment).
* Added `GenAiComputeTask` field for [jobs.RunTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunTask).
* Added `GenAiComputeTask` field for [jobs.SubmitTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitTask).
* Added `GenAiComputeTask` field for [jobs.Task](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Task).
* Added `RunName` field for [ml.CreateRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CreateRun).
* Added `RunName` field for [ml.RunInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#RunInfo).
* Added `RunName` field for [ml.UpdateRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#UpdateRun).
* Added `Lifetime` field for [oauth2.CreateServicePrincipalSecretRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CreateServicePrincipalSecretRequest).
* Added `ExpireTime` field for [oauth2.CreateServicePrincipalSecretResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CreateServicePrincipalSecretResponse).
* Added `ExpireTime` field for [oauth2.SecretInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#SecretInfo).
* Added `InstanceProfileArn` field for [serving.AmazonBedrockConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AmazonBedrockConfig).
* Added `Add`, `Principal` and `Remove` fields for [sharing.PermissionsChange](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#PermissionsChange).
* Added `ColumnsToRerank` field for [vectorsearch.QueryVectorIndexRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#QueryVectorIndexRequest).
* Added `Oracle` and `Teradata` enum values for [catalog.ConnectionType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ConnectionType).
* Added `FunctionArgumentsInvalidTypeException` and `MessageCancelledWhileExecutingException` enum values for [dashboards.MessageErrorType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageErrorType).
* Added `Waiting` enum value for [jobs.RunLifecycleStateV2State](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunLifecycleStateV2State).
* Added `ActiveOnly`, `All` and `DeletedOnly` enum values for [ml.ViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ViewType).
* Added `OauthClientCredentials` enum value for [sharing.AuthenticationType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#AuthenticationType).
* Added `Raw` enum value for [workspace.ExportFormat](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#ExportFormat).
* [Breaking] Changed `GetByName` method for [w.Experiments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ExperimentsAPI) workspace-level service to return [ml.GetExperimentByNameResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#GetExperimentByNameResponse).
* [Breaking] Changed `LogInputs` method for [w.Experiments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ExperimentsAPI) workspace-level service with new required argument order.
* [Breaking] Changed `SharePermissions` and `UpdatePermissions` methods for [w.Shares](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#SharesAPI) workspace-level service return type to become non-empty.
* [Breaking] Changed `SharePermissions` method for [w.Shares](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#SharesAPI) workspace-level service to return [sharing.GetSharePermissionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#GetSharePermissionsResponse).
* [Breaking] Changed `UpdatePermissions` method for [w.Shares](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#SharesAPI) workspace-level service to return [sharing.UpdateSharePermissionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#UpdateSharePermissionsResponse).
* Changed `PolicyId` field for [billing.BudgetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetPolicy) to no longer be required.
* [Breaking] Changed `PolicyId` field for [billing.BudgetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetPolicy) to no longer be required.
* [Breaking] Changed `Partitions` field for [cleanrooms.CleanRoomAssetTableLocalDetails](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetTableLocalDetails) to type [cleanrooms.PartitionList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#PartitionList).
* [Breaking] Changed `Query` field for [dashboards.GenieAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAttachment) to type [dashboards.GenieQueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieQueryAttachment).
* Changed `Digest`, `Name`, `Source` and `SourceType` fields for [ml.Dataset](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#Dataset) to be required.
* [Breaking] Changed `Digest`, `Name`, `Source` and `SourceType` fields for [ml.Dataset](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#Dataset) to be required.
* [Breaking] Changed `Dataset` field for [ml.DatasetInput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#DatasetInput) to be required.
* Changed `Dataset` field for [ml.DatasetInput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#DatasetInput) to be required.
* Changed `Key` and `Value` fields for [ml.InputTag](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#InputTag) to be required.
* [Breaking] Changed `Key` and `Value` fields for [ml.InputTag](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#InputTag) to be required.
* [Breaking] Changed `ViewType` field for [ml.ListExperimentsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ListExperimentsRequest) to type [ml.ViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ViewType).
* [Breaking] Changed `RunId` field for [ml.LogInputs](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#LogInputs) to be required.
* [Breaking] Changed `ViewType` field for [ml.SearchExperiments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#SearchExperiments) to type [ml.ViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ViewType).
* [Breaking] Changed `RunViewType` field for [ml.SearchRuns](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#SearchRuns) to type [ml.ViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ViewType).
* [Breaking] Removed `CustomTags` and `PolicyName` fields for [billing.CreateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#CreateBudgetPolicyRequest).
* [Breaking] Removed `CachedQuerySchema`, `Description`, `Id`, `InstructionId`, `InstructionTitle`, `LastUpdatedTimestamp`, `Query`, `StatementId` and `Title` fields for [dashboards.QueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#QueryAttachment).
* [Breaking] Removed `MaxResults` and `PageToken` fields for [sharing.UpdateSharePermissions](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#UpdateSharePermissions).
* [Breaking] Removed `ActiveOnly`, `All` and `DeletedOnly` enum values for [ml.SearchExperimentsViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#SearchExperimentsViewType).
* [Breaking] Removed `ActiveOnly`, `All` and `DeletedOnly` enum values for [ml.SearchRunsRunViewType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#SearchRunsRunViewType).
## What changes are proposed in this pull request?

This PR fixes unmarshalling of the `RetryInfo` error detail.
Specifically, it properly unmarshal the underlying
`google.protobuf.Duration` proto [as a
string](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/duration.proto#L92-L101).

Note: we should ultimately consider using the actual proto generated
objects instead of this custom code.

## How is this tested?

Updated unit tests.

NO_CHANGELOG=true
## What changes are proposed in this pull request?
Removes the following files:
* `.codegen/changelog.md.tmpl`: The new automated tagging does not use
this. API Changelogs are now generated at update time and use a separate
template.
* `.codegen/changelog_config.yml` and `.github/workflow/message.yml`:
Changelogs are now manually written and we don't need to enforce the
tags in the PR message.

## How is this tested?
N/A

## Changelog Skip
No user impact

NO_CHANGELOG=true
## What changes are proposed in this pull request?

This PR updates SDK to the latest OpenAPI spec. 
This PR also updates the mockery version as the currently used version
is not compatible with go 1.24.0.

## How is this tested?

Existing Tests
## Release v0.60.0

### API Changes
* Added [w.Forecasting](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ForecastingAPI) workspace-level service.
* Added `ExecuteMessageAttachmentQuery` and `GetMessageAttachmentQueryResult` methods for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
* Added `StatementId` field for [dashboards.GenieQueryAttachment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieQueryAttachment).
* Added `BudgetPolicyId` field for [serving.CreateServingEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#CreateServingEndpoint).
* Added `BudgetPolicyId` field for [serving.ServingEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpoint).
* Added `BudgetPolicyId` field for [serving.ServingEndpointDetailed](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointDetailed).
* Added `CouldNotGetModelDeploymentsException` enum value for [dashboards.MessageErrorType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageErrorType).
deco-sdk-tagging bot and others added 2 commits March 26, 2025 11:59
## Release v0.61.0

### New Features and Improvements

* Support user-to-machine authentication in the SDK ([#1108](#1108)).
- Instances of `ApiClient` now share the same connection pool by default ([PR #1190](#1190)).

### Internal Changes

- Stop recommending users to report an issue when the SDK encounters an unknown
  error ([PR #1189](#1189)).

### API Changes
* Added `GenerateDownloadFullQueryResult` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
* Added `EffectiveUserApiScopes`, `Oauth2AppClientId`, `Oauth2AppIntegrationId` and `UserApiScopes` fields for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
* Added `Abfss`, `Dbfs`, `ErrorMessage`, `ExecutionDurationSeconds`, `File`, `Gcs`, `S3`, `Status`, `Volumes` and `Workspace` fields for [compute.InitScriptInfoAndExecutionDetails](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptInfoAndExecutionDetails).
* [Breaking] Added `ForecastGranularity` field for [ml.CreateForecastingExperimentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CreateForecastingExperimentRequest).
* Added `JwksUri` field for [oauth2.OidcFederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#OidcFederationPolicy).
* Added `EventLog` field for [pipelines.CreatePipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#CreatePipeline).
* Added `EventLog` field for [pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline).
* Added `EventLog` field for [pipelines.PipelineSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineSpec).
* Added `FallbackConfig` field for [serving.AiGatewayConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AiGatewayConfig).
* Added `CustomProviderConfig` field for [serving.ExternalModel](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ExternalModel).
* Added `FallbackConfig` field for [serving.PutAiGatewayRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#PutAiGatewayRequest).
* Added `FallbackConfig` field for [serving.PutAiGatewayResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#PutAiGatewayResponse).
* Added `Aliases`, `Comment`, `DataType`, `DependencyList`, `FullDataType`, `Id`, `InputParams`, `Name`, `Properties`, `RoutineDefinition`, `Schema`, `SecurableKind`, `Share`, `ShareId`, `StorageLocation` and `Tags` fields for [sharing.DeltaSharingFunction](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#DeltaSharingFunction).
* Added `QuerySource` field for [sql.QueryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryInfo).
* Added `ForeignCatalog` enum value for [catalog.CatalogType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogType).
* Added `Browse` enum value for [catalog.Privilege](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#Privilege).
* Added `AccessTokenFailure`, `AllocationTimeout`, `AllocationTimeoutNodeDaemonNotReady`, `AllocationTimeoutNoHealthyClusters`, `AllocationTimeoutNoMatchedClusters`, `AllocationTimeoutNoReadyClusters`, `AllocationTimeoutNoUnallocatedClusters`, `AllocationTimeoutNoWarmedUpClusters`, `AwsInaccessibleKmsKeyFailure`, `AwsInstanceProfileUpdateFailure`, `AwsInvalidKeyPair`, `AwsInvalidKmsKeyState`, `AwsResourceQuotaExceeded`, `AzurePackedDeploymentPartialFailure`, `BootstrapTimeoutDueToMisconfig`, `BudgetPolicyLimitEnforcementActivated`, `BudgetPolicyResolutionFailure`, `CloudAccountSetupFailure`, `CloudOperationCancelled`, `CloudProviderInstanceNotLaunched`, `CloudProviderLaunchFailureDueToMisconfig`, `CloudProviderResourceStockoutDueToMisconfig`, `ClusterOperationThrottled`, `ClusterOperationTimeout`, `ControlPlaneRequestFailureDueToMisconfig`, `DataAccessConfigChanged`, `DisasterRecoveryReplication`, `DriverEviction`, `DriverLaunchTimeout`, `DriverNodeUnreachable`, `DriverOutOfDisk`, `DriverOutOfMemory`, `DriverPodCreationFailure`, `DriverUnexpectedFailure`, `DynamicSparkConfSizeExceeded`, `EosSparkImage`, `ExecutorPodUnscheduled`, `GcpApiRateQuotaExceeded`, `GcpForbidden`, `GcpIamTimeout`, `GcpInaccessibleKmsKeyFailure`, `GcpInsufficientCapacity`, `GcpIpSpaceExhausted`, `GcpKmsKeyPermissionDenied`, `GcpNotFound`, `GcpResourceQuotaExceeded`, `GcpServiceAccountAccessDenied`, `GcpServiceAccountNotFound`, `GcpSubnetNotReady`, `GcpTrustedImageProjectsViolated`, `GkeBasedClusterTermination`, `InitContainerNotFinished`, `InstancePoolMaxCapacityReached`, `InstancePoolNotFound`, `InstanceUnreachableDueToMisconfig`, `InternalCapacityFailure`, `InvalidAwsParameter`, `InvalidInstancePlacementProtocol`, `InvalidWorkerImageFailure`, `InPenaltyBox`, `LazyAllocationTimeout`, `MaintenanceMode`, `NetvisorSetupTimeout`, `NoMatchedK8s`, `NoMatchedK8sTestingTag`, `PodAssignmentFailure`, `PodSchedulingFailure`, `ResourceUsageBlocked`, `SecretCreationFailure`, `ServerlessLongRunningTerminated`, `SparkImageDownloadThrottled`, `SparkImageNotFound`, `SshBootstrapFailure`, `StorageDownloadFailureDueToMisconfig`, `StorageDownloadFailureSlow`, `StorageDownloadFailureThrottled`, `UnexpectedPodRecreation`, `UserInitiatedVmTermination` and `WorkspaceUpdate` enum values for [compute.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#TerminationReasonCode).
* Added `GeneratedSqlQueryTooLongException` and `MissingSqlQueryException` enum values for [dashboards.MessageErrorType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#MessageErrorType).
* Added `Balanced` enum value for [jobs.PerformanceTarget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#PerformanceTarget).
* Added `ListingResource` enum value for [marketplace.FileParentType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#FileParentType).
* Added `App` enum value for [marketplace.MarketplaceFileType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#MarketplaceFileType).
* Added `Custom` enum value for [serving.ExternalModelProvider](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ExternalModelProvider).
* Added `ArclightMultiTenantAzureExchangeToken` and `ArclightMultiTenantAzureExchangeTokenWithUserDelegationKey` enum values for [settings.TokenType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#TokenType).
* [Breaking] Changed `CreateExperiment` method for [w.Forecasting](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ForecastingAPI) workspace-level service with new required argument order.
* Changed `InstanceTypeId` field for [compute.NodeInstanceType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#NodeInstanceType) to be required.
* Changed `Category` field for [compute.NodeType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#NodeType) to be required.
* [Breaking] Changed `Functions` field for [sharing.ListProviderShareAssetsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#ListProviderShareAssetsResponse) to type [sharing.DeltaSharingFunctionList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#DeltaSharingFunctionList).
* [Breaking] Removed `ExecutionDetails` and `Script` fields for [compute.InitScriptInfoAndExecutionDetails](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptInfoAndExecutionDetails).
* [Breaking] Removed `SupportsElasticDisk` field for [compute.NodeType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#NodeType).
* [Breaking] Removed `DataGranularityQuantity` and `DataGranularityUnit` fields for [ml.CreateForecastingExperimentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CreateForecastingExperimentRequest).
* [Breaking] Removed `Aliases`, `Comment`, `DataType`, `DependencyList`, `FullDataType`, `Id`, `InputParams`, `Name`, `Properties`, `RoutineDefinition`, `Schema`, `SecurableKind`, `Share`, `ShareId`, `StorageLocation` and `Tags` fields for [sharing.Function](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#Function).
… has been discontinued (#1205)

## What changes are proposed in this pull request?
As of April 7, 2025: Official support for the legacy version of
dashboards has ended.
https://docs.databricks.com/gcp/en/sql/user/dashboards. Removing the
test and keeping it commented out for context as discussed.

## How is this tested?
N/A
deco-sdk-tagging bot and others added 2 commits April 10, 2025 13:33
## Release v0.62.0

### Internal Changes
* Remove `TestAccDashboards` as legacy dashboard creation on has been discontinued ([#1205](#1205)).
## What changes are proposed in this pull request?
Update SDK to latest OpenAPI spec

## How is this tested?
N/A

---------

Co-authored-by: Parth Bansal <parth.bansal@databricks.com>
deco-sdk-tagging bot and others added 4 commits April 14, 2025 14:27
## Release v0.63.0

### API Changes
* Added [w.EnableExportNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EnableExportNotebookAPI) workspace-level service, [w.EnableNotebookTableClipboard](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EnableNotebookTableClipboardAPI) workspace-level service and [w.EnableResultsDownloading](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EnableResultsDownloadingAPI) workspace-level service.
* Added `GetCredentialsForTraceDataDownload` and `GetCredentialsForTraceDataUpload` methods for [w.Experiments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ExperimentsAPI) workspace-level service.
* Added `GetDownloadFullQueryResult` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
* Added `GetPublishedDashboardTokenInfo` method for [w.LakeviewEmbedded](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#LakeviewEmbeddedAPI) workspace-level service.
* Added `BindingWorkspaceIds` field for [billing.BudgetPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#BudgetPolicy).
* Added `DownloadId` field for [dashboards.GenieGenerateDownloadFullQueryResultResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieGenerateDownloadFullQueryResultResponse).
* Added `DashboardOutput` field for [jobs.RunOutput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunOutput).
* Added `DashboardTask` and `PowerBiTask` fields for [jobs.RunTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunTask).
* Added `DashboardTask` and `PowerBiTask` fields for [jobs.SubmitTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitTask).
* Added `DashboardTask` and `PowerBiTask` fields for [jobs.Task](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Task).
* Added `IncludeFeatures` field for [ml.CreateForecastingExperimentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CreateForecastingExperimentRequest).
* Added `Models` field for [ml.LogInputs](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#LogInputs).
* Added `DatasetDigest`, `DatasetName` and `ModelId` fields for [ml.LogMetric](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#LogMetric).
* Added `DatasetDigest`, `DatasetName`, `ModelId` and `RunId` fields for [ml.Metric](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#Metric).
* Added `ModelInputs` field for [ml.RunInputs](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#RunInputs).
* Added `ClientApplication` field for [sql.QueryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#QueryInfo).
* Added `Geography` and `Geometry` enum values for [catalog.ColumnTypeName](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ColumnTypeName).
* Added `AllocationTimeoutNoHealthyAndWarmedUpClusters`, `DockerContainerCreationException`, `DockerImageTooLargeForInstanceException` and `DockerInvalidOsException` enum values for [compute.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#TerminationReasonCode).
* Added `Standard` enum value for [jobs.PerformanceTarget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#PerformanceTarget).
* Added `CanView` enum value for [sql.WarehousePermissionLevel](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#WarehousePermissionLevel).
* [Breaking] Changed `GenerateDownloadFullQueryResult` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service . Method path has changed.
* [Breaking] Changed waiter for [CommandExecutionAPI.Create](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#CommandExecutionAPI.Create).
* [Breaking] Changed waiter for [CommandExecutionAPI.Execute](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#CommandExecutionAPI.Execute).
* [Breaking] Removed `Error`, `Status` and `TransientStatementId` fields for [dashboards.GenieGenerateDownloadFullQueryResultResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieGenerateDownloadFullQueryResultResponse).
* [Breaking] Removed `Balanced` and `CostOptimized` enum values for [jobs.PerformanceTarget](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#PerformanceTarget).
* [Breaking] Removed [PipelinesAPI.WaitGetPipelineRunning](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelinesAPI.WaitGetPipelineRunning) method.
## What changes are proposed in this pull request?

This PR updates the names of many `Example...` functions in
`*_usage_test.go` files across multiple service packages to comply with
stricter vet rules introduced in Go 1.24.

- **WHAT**: Renamed example functions so that their names match real
exported identifiers.
- **WHY**: In Go 1.24, the `tests` analyzer in `go vet` enforces that
example function names must map to valid exported identifiers. These
stricter checks caused previously valid tests to fail during `go test`,
even though the actual test logic remained unchanged.

## How is this tested?

Validated by running `make test` locally with Go 1.24. All example tests
now pass without build or vet errors.

NO_CHANGELOG=true

Co-authored-by: Omer Lachish <rauchy@users.noreply.github.com>
## What changes are proposed in this pull request?
Enabled asynchronous token refreshes by default

## How is this tested?
Integration tests will be run using the new default
## What changes are proposed in this pull request?
Update SDK to latest OpenAPI spec

## How is this tested?
N/A
deco-sdk-tagging bot and others added 2 commits April 24, 2025 18:26
## Release v0.64.0

### New Features and Improvements
* Enabled asynchronous token refreshes by default ([#1208](#1208)).

### API Changes
* Added `UpdateEndpointBudgetPolicy` and `UpdateEndpointCustomTags` methods for [w.VectorSearchEndpoints](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchEndpointsAPI) workspace-level service.
* Added `NodeTypeFlexibility` field for [compute.EditInstancePool](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#EditInstancePool).
* Added `PageSize` and `PageToken` fields for [compute.GetEvents](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetEvents).
* Added `NextPageToken` and `PrevPageToken` fields for [compute.GetEventsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetEventsResponse).
* Added `NodeTypeFlexibility` field for [compute.GetInstancePool](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#GetInstancePool).
* Added `NodeTypeFlexibility` field for [compute.InstancePoolAndStats](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InstancePoolAndStats).
* Added `EffectivePerformanceTarget` field for [jobs.RepairHistoryItem](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RepairHistoryItem).
* Added `PerformanceTarget` field for [jobs.RepairRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RepairRun).
* Added `BudgetPolicyId` field for [vectorsearch.CreateEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#CreateEndpoint).
* Added `CustomTags` and `EffectiveBudgetPolicyId` fields for [vectorsearch.EndpointInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#EndpointInfo).
* Added `Disabled` enum value for [jobs.TerminationCodeCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#TerminationCodeCode).
* [Breaking] Changed `CreateIndex` method for [w.VectorSearchIndexes](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchIndexesAPI) workspace-level service to return [vectorsearch.VectorIndex](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorIndex).
* [Breaking] Changed `DeleteDataVectorIndex` method for [w.VectorSearchIndexes](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchIndexesAPI) workspace-level service . HTTP method/verb has changed.
* [Breaking] Changed `DeleteDataVectorIndex` method for [w.VectorSearchIndexes](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchIndexesAPI) workspace-level service with new required argument order.
* [Breaking] Changed `DataArray` field for [vectorsearch.ResultData](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#ResultData) to type [vectorsearch.ListValueList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#ListValueList).
* [Breaking] Changed waiter for [VectorSearchEndpointsAPI.CreateEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchEndpointsAPI.CreateEndpoint).
* [Breaking] Removed `NullValue` field for [vectorsearch.Value](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#Value).
## What changes are proposed in this pull request?
Implement Databricks OIDC as Token Source

## How is this tested?
Added unit and integration tests
deco-sdk-tagging bot and others added 3 commits April 29, 2025 11:37
## Release v0.65.0

### New Features and Improvements
* Introduce support for Databricks Workload Identity Federation in GitHub workflows ([1177](#1177)).
  See README.md for instructions.
* [Breaking] Users running their worklows in GitHub Actions, which use Cloud native authentication and also have a `DATABRICKS_CLIENT_ID` and `DATABRICKS_HOST` 
  environment variables set may see their authentication start failing due to the order in which the SDK tries different authentication methods.
  In such case, the `DATABRICKS_AUTH_TYPE` environment variable must be set to match the previously used authentication method.
## What changes are proposed in this pull request?

A recent refactor of U2M logic to the SDK introduced a small bug where a
hostname with a trailing slash would be rejected when using `databricks
auth login`, e.g. `databricks auth login --host
https://myworkspace.cloud.databricks.com/`. This happens because
`AccountOAuthArgument` and `WorkspaceOAuthArgument` both validate that
the provided host does not have a trailing slash. Instead, we can
tolerate hostnames ending with a slash by using the
`CanonicalHostName()` method of `Config` to normalize the hostname,
removing the unneeded trailing slash before passing the normalized
hostname to U2M auth components. I have made a similar fix to
`getOidcEndpoints`.

## How is this tested?
Unit tests are added to verify that `getOauthArgument` on `Config` works
with normalized hostnames, and same for `getOidcEndpoints`.
## What changes are proposed in this pull request?
Update the API definition of Databricks to the latest version as of 30
April 2025.

## How is this tested?

Covered by existing tests.
deco-sdk-tagging bot and others added 2 commits April 30, 2025 11:30
## Release v0.66.0

### Bug Fixes
* Tolerate trailing slashes in hostnames in `Config`.

### API Changes
* Added [w.AlertsV2](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsV2API) workspace-level service.
* Added `UpdateNccAzurePrivateEndpointRulePublic` method for [a.NetworkConnectivity](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NetworkConnectivityAPI) account-level service.
* Added `CreatedAt`, `CreatedBy` and `MetastoreId` fields for [catalog.SetArtifactAllowlist](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#SetArtifactAllowlist).
* [Breaking] Added `NetworkConnectivityConfig` field for [settings.CreateNetworkConnectivityConfigRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreateNetworkConnectivityConfigRequest).
* [Breaking] Added `PrivateEndpointRule` field for [settings.CreatePrivateEndpointRuleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreatePrivateEndpointRuleRequest).
* Added `DomainNames` field for [settings.NccAzurePrivateEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRule).
* Added `AutoResolveDisplayName` field for [sql.CreateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateAlertRequest).
* Added `AutoResolveDisplayName` field for [sql.CreateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#CreateQueryRequest).
* Added `CreateCleanRoom`, `ExecuteCleanRoomTask` and `ModifyCleanRoom` enum values for [catalog.Privilege](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#Privilege).
* Added `DnsResolutionError` and `GcpDeniedByOrgPolicy` enum values for [compute.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#TerminationReasonCode).
* Added `Expired` enum value for [settings.NccAzurePrivateEndpointRuleConnectionState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRuleConnectionState).
* [Breaking] Changed `CreateNetworkConnectivityConfiguration` and `CreatePrivateEndpointRule` methods for [a.NetworkConnectivity](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NetworkConnectivityAPI) account-level service with new required argument order.
* [Breaking] Changed `WorkloadSize` field for [serving.ServedModelInput](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServedModelInput) to type `string`.
* [Breaking] Changed `GroupId` field for [settings.NccAzurePrivateEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRule) to type `string`.
* [Breaking] Changed `TargetServices` field for [settings.NccAzureServiceEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzureServiceEndpointRule) to type [settings.EgressResourceTypeList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#EgressResourceTypeList).
* [Breaking] Removed `Name` and `Region` fields for [settings.CreateNetworkConnectivityConfigRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreateNetworkConnectivityConfigRequest).
* [Breaking] Removed `GroupId` and `ResourceId` fields for [settings.CreatePrivateEndpointRuleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreatePrivateEndpointRuleRequest).
* [Breaking] Removed `Large`, `Medium` and `Small` enum values for [serving.ServedModelInputWorkloadSize](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServedModelInputWorkloadSize).
* [Breaking] Removed `Blob`, `Dfs`, `MysqlServer` and `SqlServer` enum values for [settings.NccAzurePrivateEndpointRuleGroupId](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRuleGroupId).
* [Breaking] Field `AppDeployment` of `CreateAppDeploymentRequest` is changed from `*AppDeployment` to `AppDeployment`.
* [Breaking] Field `App` of `CreateAppRequest` is changed from `*App` to `App`.
* [Breaking] Field `App` of `UpdateAppRequest` is changed from `*App` to `App`.
* [Breaking] Field `BudgetPolicy` of `UpdateBudgetPolicyRequest` is changed from `*BudgetPolicy` to `BudgetPolicy`.
* [Breaking] Field `OnlineTable` of `CreateOnlineTableRequest` is changed from `*OnlineTable` to `OnlineTable`.
* [Breaking] Field `CleanRoomAsset` of `CreateCleanRoomAssetRequest` is changed from `*CleanRoomAsset` to `CleanRoomAsset`.
* [Breaking] Field `CleanRoom` of `CreateCleanRoomRequest` is changed from `*CleanRoom` to `CleanRoom`.
* [Breaking] Field `CleanRoomAsset` of `UpdateCleanRoomAssetRequest` is changed from `*CleanRoomAsset` to `CleanRoomAsset`.
* [Breaking] Field `Dashboard` of `CreateDashboardRequest` is changed from `*Dashboard` to `Dashboard`.
* [Breaking] Field `Schedule` of `CreateScheduleRequest` is changed from `*Schedule` to `Schedule`.
* [Breaking] Field `Subscription` of `CreateSubscriptionRequest` is changed from `*Subscription` to `Subscription`.
* [Breaking] Field `Dashboard` of `UpdateDashboardRequest` is changed from `*Dashboard` to `Dashboard`.
## What changes are proposed in this pull request?
Bumps the API specification for the Go SDK to the latest API definition
as of 2 May 2025.

In particular, this fixes the handling of VectorSearch's QueryIndex()
method.

## How is this tested?
Tested by existing tests.
deco-sdk-tagging bot and others added 3 commits May 2, 2025 16:25
## Release v0.67.0

### Bug Fixes
* Fixed the deserialization of responses in VectorSearchAPI's `QueryIndex()` method ([#1214](https://github.com/databricks/databricks-sdk-py/pull/1214)).

### API Changes
* Added `FutureFeatureDataPath` field for [ml.CreateForecastingExperimentRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CreateForecastingExperimentRequest).
* Added `ExcludeColumns` and `IncludeColumns` fields for [pipelines.TableSpecificConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#TableSpecificConfig).
* Added `NetworkCheckControlPlaneFailure`, `NetworkCheckDnsServerFailure`, `NetworkCheckMetadataEndpointFailure`, `NetworkCheckMultipleComponentsFailure`, `NetworkCheckNicFailure`, `NetworkCheckStorageFailure` and `SecretPermissionDenied` enum values for [compute.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#TerminationReasonCode).
* [Breaking] Changed [vectorsearch.ListValue](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#ListValue) to.
* [Breaking] Changed `PipelineId` field for [pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline) to be required.
* Changed `ConnectionName`, `GatewayStorageCatalog` and `GatewayStorageSchema` fields for [pipelines.IngestionGatewayPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionGatewayPipelineDefinition) to be required.
* [Breaking] Changed `ConnectionName`, `GatewayStorageCatalog` and `GatewayStorageSchema` fields for [pipelines.IngestionGatewayPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionGatewayPipelineDefinition) to be required.
* [Breaking] Changed `Kind` field for [pipelines.PipelineDeployment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineDeployment) to be required.
* Changed `Kind` field for [pipelines.PipelineDeployment](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineDeployment) to be required.
* [Breaking] Changed `DestinationCatalog`, `DestinationSchema` and `SourceUrl` fields for [pipelines.ReportSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#ReportSpec) to be required.
* Changed `DestinationCatalog`, `DestinationSchema` and `SourceUrl` fields for [pipelines.ReportSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#ReportSpec) to be required.
* [Breaking] Changed `DestinationCatalog`, `DestinationSchema` and `SourceSchema` fields for [pipelines.SchemaSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#SchemaSpec) to be required.
* Changed `DestinationCatalog`, `DestinationSchema` and `SourceSchema` fields for [pipelines.SchemaSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#SchemaSpec) to be required.
* Changed `DestinationCatalog`, `DestinationSchema` and `SourceTable` fields for [pipelines.TableSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#TableSpec) to be required.
* [Breaking] Changed `DestinationCatalog`, `DestinationSchema` and `SourceTable` fields for [pipelines.TableSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#TableSpec) to be required.
* [Breaking] Changed pagination for [AlertsV2API.ListAlerts](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#AlertsV2API.ListAlerts).
* [Breaking] Changed waiter for [GenieAPI.CreateMessage](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI.CreateMessage).
…iable. (#1215)

## What changes are proposed in this pull request?

This PR adds a new way to authenticate by reading OIDC ID tokens from
environment variables. By default, the new credential strategy attempts
to read the token from `DATABRICKS_OIDC_TOKEN`. This default value can
be overwritten by setting `DATABRICKS_OIDC_TOKEN_ENV`.

The new authentication mode will be tested before Github OIDC. The
rationale is that we consider setting up `DATABRICKS_OIDC_TOKEN` as a
stronger signal of intent than enabling OIDC for the whole Github
Action.

This PR also moves `IDTokenSource` in its own `oidc` package within the
`experimental/auth` package to clarify that these interfaces are still
being validated.

## How is this tested?

Complete test coverage of the new source.
## What changes are proposed in this pull request?

Add support to load OIDC ID Tokens from a file. This adds support for
arbitrary ID Tokens in exchange of delegating to the user the
responsibility of minting and refreshing the token.

## How is this tested?
Added unit test.

---------

Co-authored-by: Renaud Hartert <renaud.hartert@databricks.com>
deco-sdk-tagging bot and others added 2 commits May 6, 2025 19:23
## Release v0.68.0

### New Features and Improvements

- Add support for OIDC ID token authentication using a file
  ([PR #1213](#1213)).
- Add support for OIDC ID token authentication using an environment variable
  ([PR #1215](#1215)).
## What changes are proposed in this pull request?

This PR adds support to authenticate with [Account-wide token
federation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation#account-wide-token-federation)
from the following auth methods: `env-oidc`, `file-oidc`, and
`github-oidc`.

The PR also slightly re-organize the code by moving the OIDC token
source and Github IDTokenSource in the `oidc` package.

## How is this tested?

Unit test + local validation.
Copy link

github-actions bot commented May 9, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1138
  • Commit SHA: a2a34b9b7832af018b840a23e7c713ffe313ddad

Checks will be approved automatically on success.

@parthban-db parthban-db closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants