-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PR's are getting opened that revert a bunch of deps #4536
Comments
In addition, we are seeing attempts to upgrade to package versions that are higher than the latest, and therefore do not even exist. |
Thanks for reporting! We're investigating what's happening |
@jeffwidman are you able to reproduce this with the dry run script on the repo? |
This may be related to #4322, which also had some random dependencies being changed and where we also saw "out of memory errors" (we haven't experienced this again, but we are seeing "out of memory errors" again in the last days) |
@mx-psi it is very possible as the repos have large numbers of related dependencies |
@dtomcej are you able to reproduce the problem on a public repo? I'm trying to find a way to figure out what's going on |
@jurre I am currently running the |
Hello @jurre I have compiled some results that hopefully may shed some light on the issue. I ran the Sanitized results are as follows:
The tool recognizes that module |
@dtomcej: Thanks! Something odd is definitely going on but it's great that you can reproduce it. Since we don't have access to this repo would you be able to run these steps that Dependabot would perform in the dev container and see if any of them result in the unexpected changes? If so it would be worth repeating them outside the dev container as well.
Another way to inspect what Dependabot is doing here would be to used the debugger. You could insert a line containing dependabot-core/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb Line 86 in b78e5d7
bin/dry-run.rb go_modules private/repository --dep github.com/private/P . That would allow you to step through what's going on.
|
Hello @mctofu, those goprivate commands worked without any issues, and they correctly updated the required module, and nothing else. I tried with |
Could you give me a more detailed prcedure to add Not sure what would need to be added. |
@dtomcej: I pushed up a branch that adds some debugging statements during the update process that will hopefully guide us to where it's going wrong: https://github.com/dependabot/dependabot-core/compare/mctofu/debug-go-mod-update. If you switch to that branch and redo the dry run we should see some additional output like: output with debug
That will be easier than using byebug but if you want to give that a try too you'll add the byebug statement wherever you'd like to start debugging.
Then when you run the dry-run script you'll get an interactive terminal:
From there you can evaluate statements like
Or use |
Hello @mctofu, I think we are getting somewhere: When using your branch, it appears that the versions get broken after the
|
Thanks @dtomcej! That definitely narrows it down but is also very strange 🤔! Because dependabot-core/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb Line 184 in c5389f6
I'm not familiar with why that's necessary but some next steps to try could be:
If that doesn't seem to be the culprit the next thing we could try is switching back to an older version of go. That is configured here: Lines 170 to 171 in c5389f6
Some previous versions: 50b95a0, 1cba38d, 093592f, af35f1b After changing it you need to relaunch the dev shell with |
I think I am making more progress here. After fighting with our corp SSO, I was able to get a lot closer to reproducing the issue in a raw format: On my workstation (outside the dev container), in our repo, this is the output:
In the dev container, in our same repo, this is the output:
|
@dtomcej: Wow, that's interesting! Curious if you'd get the same results using the |
@mctofu Turns out we get the exact identical results with the |
Would you mind trying with older versions of the golang image to determine if this is a problem that's been recently introduced? We may want to roll Dependabot back to an older version temporarily if it's a bug and knowing which version causes it would help track down the issue. Thanks for your help in debugging this! |
Hello @mctofu, Have tested with all versions of 1.17, and it does not appear to be related to any of the minor version updates. It appears that the issue stems from how go handles updating dependencies using Running:
returns the incorrect versions noted above, whether it is on my local workstation, or in any of the containers. However:
Returns the correct versions. It appears from what I can tell that the |
I will see if I can open a PR to get a patch working, and test it against our repo for confirmation. |
@dtomcej Did you have any success in determining what the issue was in |
Hello @mctofu unfortunately my tests gave inconsistent results. Since go 1.18 changes this a bit, and is so close, I am waiting to test with 1.18 and see whether that gives my tests more repeatable outcomes. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Closing out as stale |
Seeing something seriously wrong with Dependabot PR's that just got opened in some private repos.
This is for Golang code.
It's trying to bump some basic open source libs such as:
However, the
go.mod
file changes are modifying a bunch of libraries that are completely unrelated... even worse, they're reverting those versions to really old versions.The job ids:
244841423
245085086
The text was updated successfully, but these errors were encountered: