-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADO API responds with GitObjectDoesNotExistException when pushing file changes to branch #1413
Comments
@grixxie thanks for the report;
EDIT: Branch name is not the cause of the issue; tested below |
just a follow up to this; I've tried to reproduce your issue by doing the following:
All of these scenarios work without error; I was not able to reproduce the issue. Are you able to provide any more information that would help reproduce your issue? Can you identify what branch git commit |
Hi - thanks for the response. I also tested rerunning v2 with changes to the target branch name and ran into my same issue. To answer your question, I have no idea where that commit is coming from, I could not find it when I was doing my testing yesterday. I will be doing some more testing later today though so will let you know the outcome of that. You not being able to reproduce this issue definitely makes it seem like I'm doing something not quite right though... |
I have also just tried to use v2 for the first time and and running into this issue.
I also cannot find that commit ID at all, it must be one being created locally by Dependabot? I've ran the job multiple times and each time the The branch When running this, I have two package ecosystems. NuGet, which runs successfully, and then NPM, which fails. In my dependabot config file, I am attempting to use groups:
|
@rhyskoedijk I have found the same as @DaleMckeown post above; running the command |
If I flip the order of my package ecosystems to run NPM first and then NuGet, NPM runs successfully and NuGet errors instead. So it seems to be an issue related to processing multiple package ecosystems in the same Dependabot run. Also, removing the grouping configuration doesn't have any effect, the same error is thrown. Just tested again with the NPM config individually, and it works fine. So it's definitely related to having multiple package ecosystems in my case. |
Thanks @DaleMckeown, that is a good lead and something that I have not tested yet; I will investigate. |
This may be a good lead to find the root of the problem. However, just to point out my dependabot.yml config in the description of this issue, I'm only using a single package ecosystem (NuGet) and still running into this issue! |
Understood; At this point I'm just looking for a way to reproduce the error, even if it isn't your original scenario. I am out of ideas for now; If anybody is able to produce a minimal reproduction of their dependabot.yml and *.csproj that causes the error, I will revisit this. |
@rhyskoedijk I've scoured the logs again, not sure if this helps at all, but here is the first time the errant commit sha appears in the logs:
It then appears after finding the first package that needs an update. In my case, Quasar:
It then runs
It repeats the above for each NPM package that needs an update. It then marks the commit as processed, and outputs the changes detected:
It then outputs the create_pull_request response:
Then it errors:
|
I am facing the exact issue. My pipeline was successful on 14th October. The next execution on 21st October failed with this issue. I see a new version of this task has been released meanwhile. Successful pipeline
Failed pipeline
Update: |
@grixxie, @DaleMckeown, @beytun are git submodules used in your repositories facing this issue? I was able to reproduce the same error message if my repo had a submodule and Dependabot had updated one of the files within the submodule. I will continue to investigate, but curious to know if this is the same scenario or just a different way of getting the same error. |
There are no git submodules in the project I have been working on that is experiencing this issue. I still need to try and do a minimal repo to reproduce this issue. I'll try and get it done this week. |
Same issue here: 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
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... |
Just chiming in that we also experience this issue with an npm package ecosystem that contains 2 registries (a public npm registry and a private one). That said, things appear to work for a separate Python repository. I thought for a while that I was just doing things wrong and messed with some of the parameters but nothing appears to have made any difference. I'll post my configs below, maybe it can help help someone with more knowledge. Erroring Exampledependabot.yml
pipeline.yaml
Successful Exampledependabot.yml
pipeline.yaml
|
I have not been able to reproduce this issue outside of using a git submodule to trick the updater in to updating files that don't exist in the source repo (similar to #504). However, this doesn't seem to be the same problem reported here. I have submitted a change in #1452 that will add more debug info to failed DevOps API calls; Once released, it will hopefully provide more info in to the cause of this issue. |
@bhiggins14: Could you please explain how you managed to pin the Dependabot version? I do not see an option for this here: https://marketplace.visualstudio.com/items?itemName=tingle-software.dependabot |
- task: [email protected] |
@beytun: thank you very very much, this actually helps us a lot! I can confirm that with version 2.35.955 PRs can still be created, this means that the bug has to be inserted with a commit into the source code after this version. |
Could somebody still facing this issue do an update using v1.38.1 with "Enable system diagnostics" selected on the pipeline run? This version should dump more info about the failed push that will hopefully provide some clues as to what is going on. My assumption is that the error is caused by pushing a file that shouldn't be committed, but there could be more to it than just that. |
dependabotlog.txt |
@DaleMckeown thanks, that log is very helpful. It looks like on the 2nd update, the local git repo is not being reset correctly. It is likely that this issue was introduced by #1382, which would match with the comments above suggesting this issue started from v2.35.955. If you add |
@rhyskoedijk Do I Add that to the Dependabot task? i.e.:
|
Yes |
With that it fails to find my config file:
|
Ah sorry, you'll need the DevOps access token input set too, e.g: - task: dependabot@2
inputs:
targetRepositoryName: '$(Build.Repository.Name)'
azureDevOpsAccessToken: '$(System.AccessToken)' # or whatever access token you normally use for running Dependabot as |
Apologies, got distracted with other work stuff. I'll give this a go tomorrow. |
hey I'm someone who has been following the thread with the same issue. Trying to do the fix and I'm having issues passing my pat to the dependabot.yaml config from azure pipeline Here's my pipeline
Here's my dependabot.yaml
Getting 401s when trying to access my feed updater | +---------------------------------------+ |
@bhiggins14 you probably need to replace |
Sorry, I got distracted with other stuff. I'll give this a go tomorrow. |
I've tried this a few times, I can't get it working. It keeps telling me that I don't have an access token, despite the debug output above stating that I do:
|
@DaleMckeown no worries, I did some very rough testing the other day and I am fairly confident that reverting #1382 would fix the issue. I hope to have a PR for it this weekend. |
hey @rhyskoedijk the settings you gave me worked worked and I was able to generate PRs successfully with
|
This should be fixed by #1478. |
Could everyone impacted by this please test again using 1.38.2? I know at least one instance of this error is fixed, but if there are still scenarios which aren't fixed, it would be good to get a copy of your logs so I can investigate further. Thanks. |
@rhyskoedijk FYI It fixed my case. |
Hi,
I am facing the following problem with my dependabot (v2) pipeline. My pipeline looks like so:
My dependabot.yml config looks like so:
My pipeline is erroring with the following error snippet, when it tries to call the /pushes endpoint of my repo via the ADO API to push the file changed. It is complaining that an object does not exist; I am not sure what this object is refering to. My
release-15
branch mentioned in my dependabot.yml definitely exists and is a different ID to the one mentioned in the error...The error:
Please advise if I am doing something wrong. If you need any more information then please let me know and I will provide. Thank you.
If anyone else is also experiencing this issue please respond!
The text was updated successfully, but these errors were encountered: