Open mzwiesler opened 7 months ago
Having the same issue.
Hey @mzwiesler , I solved it for me. Do you have multiple user profiles in your .databrickscfg file?
Hi @christopher-danz Yes I have a couple of them and a default one. Tried the command with profile and without but nothing worked so far. Did you solve it?
I feel like I tried everything there is to troubleshoot.. empty cache, create new .databrickscfg file, generate new token, ... the whole thing and I am not entirely sure what made the differnce in the end..
After ensuring you authenticate correctly, try to run:
databricks jobs list
... it should list all the jobs for your DEFAULT profile.
then run:
databricks jobs list --profile=YOUR_DESIRED_PROFILE_TO_USE_DAB
and it should list the jobs for the other host, right?
I then ran:
databricks bundle init
(specified the unique name and the additional stuff)
and it worked then.
I hope this will solve your issue, if not let me know. Maybe I can further assist you.
Hi @christopher-danz True it seems it really was a token issue. It now works with a new token. Still not 100% sure what happened. Thanks for your support.
I'm glad it worked out for both of us. 😊
Similar issue here, I'm using an asset bundle generated with databricks bundle init mlops-stacks
, the CI/CD is set to run databricks bundle validate
with a DATABRICKS_TOKEN
env var, but it's failing with that "cannot unmarshal" error
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 * Host: * Accept: application/json * Authorization: REDACTED * Traceparent: 00-fdc3a9a[7](https://github.com/KardFinancial/merchant-identification/actions/runs/9898272483/job/27344733076#step:4:8)5520e3039777b7e44a23e6[8](https://github.com/KardFinancial/merchant-identification/actions/runs/9898272483/job/27344733076#step:4:9)f-8af3b60ecbd5fbc2-01 * User-Agent: cli/0.221.0 databricks-sdk-go/0.42.0 go/1.21.10 os/linux cmd/bundle_validate auth/pat cicd/github < HTTP/2.0 401 Unauthorized < * Content-Length: [9](https://github.com/KardFinancial/merchant-identification/actions/runs/9898272483/job/27344733076#step:4:10)8 < * Content-Type: application/json; charset=utf-8 < * Date: Thu, [11](https://github.com/KardFinancial/merchant-identification/actions/runs/9898272483/job/27344733076#step:4:12) Jul 2024 20:48:14 GMT < * Server: databricks < * Vary: Accept-Encoding < * Www-Authenticate: ***"DatabricksRealm" < * X-Databricks-Reason-Phrase: Credential was not sent or was of an unsupported type for this API. < { < "error_code": 401, < "message": "Credential was not sent or was of an unsupported type for this API." < }
Description
Calling
databricks bundles init
returns the following error:Error: failed to compute file content for {{.project_name}}/databricks.yml.tmpl. template: :35:31: executing "" at: error calling user_name: 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.
Reproduction Running
databricks bundles init
:Expected behavior Creation of databricks asset bundle
Is it a regression? using databricks cli v0.212.3
Debug Logs Request log:
Other Information
Additional context Add any other context about the problem here.