databricks-sdk-go
databricks-sdk-go copied to clipboard
[ISSUE] Commands executed through Github Actions workflow fails on some workspaces
Description
I have a workflow that utilizes the Databricks CLI to fetch the latest registered version of a model and updates a serving endpoint to that new model. This works in the dev workspace but fails in both staging and prod due to the same error (Invalid access to Org).
The commands used (databricks model-versions list, databricks serving-endpoints update-config) in the workflow works locally for all workspaces/environments but fails in GitHub Actions workflow on staging and prod.
Expected behavior
As the workflow works in the dev workspace I would expect it to work in staging and prod as well. Are there some authentication settings that might have to be tweaked to allow for GitHub Actions to use the REST API/CLI?
Debug Logs
GET /api/2.1/unity-catalog/models/ahera_aws_use1_staging.conversational-ai.manimr/versions
> * Host:
> * Accept: application/json
> * Authorization: REDACTED
> * Traceparent: 00-f3a3e81500604812b9e2a8ae247cbe51-c7c83a82a35bbb88-01
> * User-Agent: cli/0.223.2 databricks-sdk-go/0.43.0 go/1.22.5 os/linux cmd/model-versions_list sdk-feature/pagination auth/pat cicd/github
< HTTP/2.0 403 Forbidden
< * Content-Length: 70
< * Content-Type: application/json; charset=utf-8
< * Date: Fri, 12 Jul 2024 09:40:37 GMT
< * Server: databricks
< * Vary: Accept-Encoding
< * X-Databricks-Reason-Phrase: Invalid access to Org: 1136135196788685
< {
< "error_code": 403,
< "message": "Invalid access to Org: 1136135196788685"
< }
Other Information Occurs during GitHub Actions Workflow