-
Notifications
You must be signed in to change notification settings - Fork 50
Return auth error when auth type is set #1223
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
Merged
Merged
+251
−186
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parthban-db
reviewed
May 20, 2025
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
parthban-db
approved these changes
May 21, 2025
deco-sdk-tagging bot
added a commit
that referenced
this pull request
May 21, 2025
## Release v0.70.0 ### Bug Fixes - Stop swallowing authentication errors when a non-default auth type is explicitly set ([#1223](#1223)) ### API Changes * Added [a.NetworkPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NetworkPoliciesAPI) account-level service and [a.WorkspaceNetworkConfiguration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#WorkspaceNetworkConfigurationAPI) account-level service. * Added [w.RecipientFederationPolicies](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#RecipientFederationPoliciesAPI) workspace-level service. * Added `CreateLoggedModel`, `DeleteLoggedModel`, `DeleteLoggedModelTag`, `FinalizeLoggedModel`, `GetLoggedModel`, `ListLoggedModelArtifacts`, `LogLoggedModelParams`, `LogOutputs`, `SearchLoggedModels` and `SetLoggedModelTags` methods for [w.Experiments](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#ExperimentsAPI) workspace-level service. * Added `UcSecurable` field for [apps.AppResource](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#AppResource). * Added `TimeseriesColumns` field for [catalog.PrimaryKeyConstraint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#PrimaryKeyConstraint). * Added `ReviewState`, `Reviews` and `RunnerCollaboratorAliases` fields for [cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook). * Added `NotebookEtag` and `NotebookUpdatedAt` fields for [cleanrooms.CleanRoomNotebookTaskRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomNotebookTaskRun). * Added `RootPath` field for [pipelines.CreatePipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#CreatePipeline). * Added `RootPath` field for [pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline). * Added `RootPath` field for [pipelines.PipelineSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#PipelineSpec). * Added `MaterializationNamespace` field for [sharing.Table](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#Table). * Added `OmitPermissionsList` field for [sharing.UpdateSharePermissions](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#UpdateSharePermissions). * Added `AutoResolveDisplayName` field for [sql.UpdateAlertRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateAlertRequest). * Added `AutoResolveDisplayName` field for [sql.UpdateQueryRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#UpdateQueryRequest). * Added `InternalCatalog`, `ManagedOnlineCatalog` and `UnknownCatalogType` enum values for [catalog.CatalogType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogType). * Added `Catalog`, `CleanRoom`, `Connection`, `Credential`, `ExternalLocation`, `ExternalMetadata`, `Function`, `Metastore`, `Pipeline`, `Provider`, `Recipient`, `Schema`, `Share`, `StagingTable`, `StorageCredential`, `Table`, `UnknownSecurableType` and `Volume` enum values for [catalog.SecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#SecurableType). * [Breaking] Changed `SecurableType` field for [catalog.CatalogInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogInfo) to type [catalog.SecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#SecurableType). * Changed `Etag` and `Name` fields for [iam.RuleSetResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/iam#RuleSetResponse) to be required. * Added `EnableFileEvents` and `FileEventQueue` fields for [catalog.CreateExternalLocation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateExternalLocation). * Added `EnableFileEvents` and `FileEventQueue` fields for [catalog.ExternalLocationInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ExternalLocationInfo). * Added `EnableFileEvents` and `FileEventQueue` fields for [catalog.UpdateExternalLocation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateExternalLocation). * Added `PolicyId` and `ServicePrincipalId` fields for [oauth2.FederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#FederationPolicy). * [Breaking] Removed `AccessPoint` field for [catalog.CreateExternalLocation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateExternalLocation). * [Breaking] Removed `AccessPoint` field for [catalog.ExternalLocationInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ExternalLocationInfo). * [Breaking] Removed `AccessPoint` field for [catalog.UpdateExternalLocation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateExternalLocation).
github-merge-queue bot
pushed a commit
to databricks/terraform-provider-databricks
that referenced
this pull request
May 22, 2025
…penAPI spec (#4735) ## Changes <!-- Summary of your changes that are easy to understand --> - Go SDK bump - Generate TF artifacts - Fix backwards incompatible changes - Fix Auth tests broken due to: databricks/databricks-sdk-go#1223 ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> CI --------- Co-authored-by: Omer Lachish <289488+rauchy@users.noreply.github.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 23, 2025
## What changes are proposed in this pull request? This PR fixes a bug introduced in PR #1223 which led token to not be cached anymore when using the `metadata-service` auth type. The PR also slightly cleans up some authentication code by consolidating on using Databricks' version of the TokenSource. ## How is this tested? Unit and integration tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
This PR refactors the default auth flow to surface authentication errors when an auth type is specified.
One side effect of this change is that errors that were previously surfaced during the default auth flow are now swallowed and only accessible via trace log.
The PR also slightly simplify the token source strategy.
How is this tested?
Unit and integration tests.