tinglesoftware / dependabot-azure-devops

Tools for updating dependencies in Azure DevOps repositories using https://dependabot.com
MIT License
201 stars 66 forks source link

Microsoft.TeamFoundation.Git.Server.GitObjectDoesNotExistException when creating Pull Requests #1439

Closed Patrick-3000 closed 3 weeks ago

Patrick-3000 commented 3 weeks ago

We were using Dependabot for MS Azure Devops V1 but as this version got deprecated, we switched to V2.

However, Dependabot is not able to create Pull Requests as it fails with

Creating pull request '[npm-Updates]: Bump lru-cache from 11.0.0 to 11.0.1'...
 - Pushing 1 file change(s) to branch 'dependabot/npm_and_yarn/main/lru-cache-11.0.1'...
🌎 🠊 [POST] [https://***/***/***/_apis/git/repositories/***/pushes?api-version=5.0](https://%2A%2A%2A/***/***/_apis/git/repositories/***/pushes?api-version=5.0)
🌎 🠈 [500] Internal Server Error
{"$id":"1","innerException":null,"message":"TF401035: The object '450425a1a469b12373a3e49b8bd23bfca51a11e3' does not exist.","typeName":"Microsoft.TeamFoundation.Git.Server.GitObjectDoesNotExistException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitObjectDoesNotExistException","errorCode":0,"eventId":3000}
##[error]Failed to create pull request: Error: Request to '[https://***/***/***/_apis/git/repositories/***/pushes?api-version=5.0'](https://%2A%2A%2A/***/***/_apis/git/repositories/***/pushes?api-version=5.0%27) failed: 500 Internal Server Error
Error: Request to '[https://***/***/***/_apis/git/repositories/***/pushes?api-version=5.0'](https://%2A%2A%2A/***/***/_apis/git/repositories/***/pushes?api-version=5.0%27) failed: 500 Internal Server Error
    at AzureDevOpsWebApiClient.restApiRequest (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/utils/azure-devops/AzureDevOpsWebApiClient.js:551:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AzureDevOpsWebApiClient.restApiPost (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/utils/azure-devops/AzureDevOpsWebApiClient.js:528:16)
    at async AzureDevOpsWebApiClient.createPullRequest (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/utils/azure-devops/AzureDevOpsWebApiClient.js:177:26)
    at async DependabotOutputProcessor.process (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/utils/dependabot-cli/DependabotOutputProcessor.js:81:42)
    at async DependabotCli.update (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/utils/dependabot-cli/DependabotCli.js:116:55)
    at async run (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.37.1025/index.js:82:57)

For me this looks like a bug (especially considering that with V1 we could create PRs), but maybe anybody has a suggestion of what I could try as I am out of ideas...

Patrick-3000 commented 3 weeks ago

Closed due to duplicate with #1413