fix timeouts caused by stashing large failed changes #11309
Merged
+9
−54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
During grouped updates, the Workspace code uses
git stash
when an update fails to get the repo back into a fresh state so it can attempt the next dependency update in the group.Unfortunately it also calls
git stash show
on the stashed change which outputs a diff of all of the changes. For Node projects that includes all ofnode_modules
so it was causing timeouts during the update.I searched around and couldn't see where we were using the output from this command so I'm going to remove the call completely.
To track this issue down, I ran an update with Dependabot CLI on a repo that was exhibiting this behavior. While it was frozen I opened another terminal in the same Docker container and ran the same command. The deluge of output confirmed the issue.
Anything you want to highlight for special attention from reviewers?
Feel free to look at the PR that introduced Workspaces: #6693
Diff is not explicitly mentioned as to what it's use is. The fact I can remove it and not get any errors confirms it's not important to the update.
How will you know you've accomplished your goal?
Timeouts in this specific case will end.
Checklist