Skip to content
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

Go modules: raise GitDependenciesNotReachable #2780

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

thepwagner
Copy link
Contributor

Sharing snapshot to discuss the approach:

When Dependabot encounters a Go module backed by a Git repository, especially one on github.com, it should raise Dependabot::GitDependenciesNotReachable with dependency-urls details describing the missing repository. This matters as the rich exception provides more detail about what went wrong and potential recovery options.

This PR accomplishes this by intercepting the error thrown from the "UpdateChecker", and detecting github.com/.* urls. If we detect the failed dependency was on github.com, we assume it's a "git dependency" and raise accordingly.

Copy link
Member

@jurre jurre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable approach to me 👍

Copy link
Contributor

@fatih fatih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍🏼

go_modules/lib/dependabot/go_modules/update_checker.rb Outdated Show resolved Hide resolved
@thepwagner thepwagner force-pushed the go-modules-git-dependency-not-reachable branch from 3eef9a1 to 6f2277a Compare November 24, 2020 14:56
@thepwagner thepwagner marked this pull request as ready for review November 24, 2020 15:13
@thepwagner thepwagner requested a review from a team as a code owner November 24, 2020 15:13
@thepwagner thepwagner self-assigned this Nov 24, 2020
@thepwagner thepwagner merged commit 10b4d91 into main Nov 25, 2020
@thepwagner thepwagner deleted the go-modules-git-dependency-not-reachable branch November 25, 2020 11:26
@thepwagner thepwagner mentioned this pull request Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants