Open nsenno-dbr opened 5 months ago
I get the same issue when using databricks-terraform-provider:
│ Error: cannot create service principal: unexpected error handling request: json: cannot unmarshal number into Go struct field APIErrorBody.error_code of type string. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
│ POST /api/2.0/preview/scim/v2/ServicePrincipals
│ > * Host:
│ > * Accept: application/json
│ > * Authorization: REDACTED
│ > * Content-Type: application/scim+json; charset=utf-8
│ > * Traceparent: 00-ab2295e010eb060d7e16f8e084c0c32e-946c9df217e181a7-01
│ > * User-Agent: databricks-tf-provider/1.47.0 databricks-sdk-go/0.41.0 go/1.21.10 os/darwin terraform/1.8.5 resource/service_principal auth/pat
│ > {
│ > "active": true,
│ > "displayName": "data-core-dev-ws-fivetran-sp",
│ > "entitlements": [
│ > {
│ > "value": "databricks-sql-access"
│ > }
│ > ],
│ > "schemas": [
│ > "urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal"
│ > ]
│ > }
│ < HTTP/2.0 403 Forbidden
│ < * Content-Length: 70
│ < * Content-Type: application/json; charset=utf-8
│ < * Date: Tue, 18 Jun 2024 03:22:46 GMT
│ < * Server: databricks
│ < * Vary: Accept-Encoding
│ < * X-Databricks-Reason-Phrase: Invalid access to Org: ***************
│ < {
│ < "error_code": 403,
│ < "message": "Invalid access to Org: ***********"
│ < }
OS: MacOS Sonoma 14.4.1
Description I was given the following error message when attempting to validate my DAB. I was able to authenticate. Note that THE ISSUE WENT AWAY AFTER AUTHENTICATING
databricks auth login
. I'm still opening this issue because I believe there is an issue with the message that prompts the user to authenticate:Error: unexpected error handling request: json: cannot unmarshal number into Go struct field APIErrorBody.error_code of type string. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
Reproduction
databricks bundle validate
(presumably while being unauthenticatedExpected behavior I am prompted to log in using the traditional Databricks CLI authentication
Is it a regression? Haven't tried other versions though I was getting the correct message to authenticate previously. Saw the new error message and thought I'd report here
Debug Logs
22:54:05 INFO start pid=11540 version=0.219.0 args="databricks, bundle, validate, --debug" 22:54:05 DEBUG Found bundle root at /Users/nick.senno/Documents/Clients/a16z/repos/datascience_monorepo/it/it_chatbot (file /Users/nick.senno/Documents/Clients/a16z/repos/datascience_monorepo/it/it_chatbot/databricks.yml) pid=11540 22:54:05 DEBUG Apply pid=11540 mutator=load 22:54:05 INFO Phase: load pid=11540 mutator=load 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=EntryPoint 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=scripts.preinit 22:54:05 DEBUG No script defined for preinit, skipping pid=11540 mutator=load mutator=seq mutator=scripts.preinit 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=ProcessRootIncludes 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq mutator=ProcessInclude(../../bundle.targets.yml) 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=VerifyCliVersion 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=EnvironmentsToTargets 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=InitializeVariables 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=DefineDefaultTarget(default) 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=LoadGitDetails 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=SelectDefaultTarget 22:54:05 DEBUG Apply pid=11540 mutator=load mutator=seq mutator=SelectDefaultTarget mutator=SelectTarget(dev) 22:54:05 DEBUG Apply pid=11540 mutator=
22:54:05 DEBUG Apply pid=11540 mutator=initialize
22:54:05 INFO Phase: initialize pid=11540 mutator=initialize
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=RewriteSyncPaths
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=MergeJobClusters
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=MergeJobTasks
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=MergePipelineClusters
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=InitializeWorkspaceClient
22:54:05 DEBUG Loading profile a16z because of host match pid=11540
22:54:05 DEBUG Apply pid=11540 mutator=initialize mutator=seq mutator=PopulateCurrentUser
22:54:05 DEBUG Loading profile a16z because of host match pid=11540
22:54:05 DEBUG non-retriable error: unexpected error handling request: json: cannot unmarshal number into Go struct field APIErrorBody.error_code of type string. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
GET /api/2.0/preview/scim/v2/Me
Other Information
Additional context Add any other context about the problem here.