Repository navigation
Pin git below 6 so Danger loads in CI - #1012
Merged
Merged
Conversation
Danger ReportNo issues found. |
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.
Summary
The Danger check that runs on every pull request fails in CI before it reviews anything, so contributors get no automated feedback. This change keeps the bundle on a version of the
gitlibrary that Danger can load, so the check runs again. Contributors and maintainers need no change to their workflow.Root cause
CI runs
bundle exec danger. With no upper bound ongit, the bundle resolvesgit6, which removed theGit::Baseconstant. Danger 9.6.1 references that constant while it loads (scm_source/git_repo.rb:209), so the job exits withuninitialized constant Git::Basebefore any pull request is checked. See the failing run on #1011: https://github.com/ruby-grape/grape-swagger/actions/runs/41628597475/job/125892119818What changes
gitis capped below 6 in thetestgroup of the Gemfile, next todanger, with a comment explaining why. The gem is only used by Danger, so the constraint does not reach the gem's runtime or the supported Grape and Ruby matrix.Drawbacks and nuances
git6. The fix is in progress upstream (uninitialized constant Git::Base on load with git 6.0.0 danger/danger#1560, with the proposed fix in Support git 6.0.0 danger/danger#1561), but it is neither merged nor released; the latest release, 9.6.1, still fails. Until then the cap holds the dependency back on purpose.Gemfileis not locked in this repo, so the cap takes effect on the next resolution in CI.Alternatives considered
git6. This leaves the check broken for every open PR in the meantime, with no release date to plan around.dangerat the upstream fix branch. Depending on an unreviewed, unmerged pull request from a fork would be less stable than a one-line cap.dangeritself. The failure comes fromgit6, and an older Danger does not guarantee it avoids the same constant.