AzureDevOps Repos Databricks update via pipeline not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 11:26 AM
Hi all, im working with Azure DevOps and Databricks, using an app registration which it has permission on AzureDevOps and inside databricks as manager,user and in the group admins so it has permission over the repos.
Im doing a pipeline to update or create a Repo and its not working
- bash: | URL="$(DATABRICKS-HOST)/api/2.0/repos/{REPO_ID}" JSON_PAYLOAD='{ "branch": "{BRANCH}", "sparse_checkout": { "patterns": [ "parent-folder/child-folder" ] } }' curl -v --location --request PATCH "$URL" \ --header "Authorization: Bearer $DATABRICKS_TOKEN" \ --header "Content-Type: application/json" \ --header "X-Databricks-Azure-SP-Management-Token: $ENTRAID_TOKEN" \ --header "X-Databricks-Org-Id: {ORG_ID}" \ --header "X-Databricks-Azure-Workspace-Resource-Id: /subscriptions/{SUBID}/resourceGroups/{RG}/providers/Microsoft.Databricks/workspaces/{DATABRICKS-NAME}" \ --data "$JSON_PAYLOAD"
I have created 3 tokens, PAT token, databricks token and EntraID token for this. Im using Data token to interact with databricks API.
Also before this step, i generate a git credential and then update the credential, get the repo id and try to update
{"error_code":"BAD_REQUEST","message":"Remote repo not found. Please ensure that:\n1. Your remote Git repo URL is valid.\n2. Your personal access token or app password has the correct repo access."} 2024-12-17T19:39:25.1346177Z
It gives me back crendetials, repos, repo permission, etc.
- Labels:
-
Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 12:00 PM
Hello @TatiMun thanks for your question, can we review the following:
- Verify Remote URL: Double-check that the remote Git repo URL associated with the REPO_ID in Databricks is correct and accessible.
- Check PAT Permissions: Ensure that the Personal Access Token used for Git credentials has the necessary permissions to access the repository in Azure DevOps.
- Test Git Connection: Try cloning the repository manually using the service principal's credentials to verify access.
- API Permissions: Confirm that the service principal has the necessary API permissions in both Azure DevOps and Databricks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 12:31 PM
Hi walter, since im not using a PAT manually generated, im generating one (i think) via pipeline
The thing is that my pipeline works in a test frial enviroment, not in a closed one. I forgot to mentioned that im using a self hosted agent for azure devops

