fix git config not present for certain tests#6431
Merged
jakecoffman merged 1 commit intomainfrom Jan 13, 2023
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In #6424 I moved the git config into the tests, but didn't realize there are some tests that run
git commitdirectly like this one:dependabot-core/common/spec/dependabot/file_fetchers/base_spec.rb
Lines 1338 to 1343 in c2b0cf8
This is resulting in racy failures in CI where the git config hasn't been set globally yet.
By moving this out of the function it will run as soon as it's required which should fix that problem. It's a bit of a naive solution though so I am not opposed to other ideas.