-
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
[Go] Add support for pseudo-version dependencies #3017
Comments
This has proved to be a bit of a pain point for an internal project. We don't really gain much value from tagging our internal repositories with semantic versions and typically want to follow the tip of the "main" branch. Having Dependabot support these types of dependencies would be really useful. #1025 explicitly prevented this. I'm curious if further thinking has been done by @hmarr about how it should work. Are there any other package ecosystems that have a similar feature? |
It's been a long time since I worked on this, but I suspect my thinking at the time was: pseudo-versions point to a specific commit, and as a commit can exist in multiple branches, and be pointed to by multiple tags, it's not always clear what "update" actually means. We encounter the same problem in other ecosystems and have a load of logic in the |
I believe there are two interconnected issues here:
Unfortunately, this means that dependabot cannot update security-critical dependencies such as https://pkg.go.dev/golang.org/x/crypto, which never publishes semver-tagged versions. I think in my mind the ideal algorithm here would be:
This means that, by default, pseudoversions are assumed to represent intermediate versions, and are updated to the next point release immediately after their current commit. But for modules that never release versions, pseudoversions get updated to the latest commit every time. |
Modules like golang.zx2c4.com/wireguard always resolve to pseudo-versions because the tags aren't in a semantic format (missing |
Since dependabot doesn't update pseudo-version dependencies, dependabot currently only handles updating dependencies which are tagged as semver, manually update the go modules. See: dependabot/dependabot-core#3017 Signed-off-by: Christopher Obbard <[email protected]>
Since dependabot doesn't update pseudo-version dependencies, dependabot currently only handles updating dependencies which are tagged as semver, manually update the go modules. This was completed by running the commands: $ go get -u $ go mod tidy See: dependabot/dependabot-core#3017 Signed-off-by: Christopher Obbard <[email protected]>
Since dependabot doesn't update pseudo-version dependencies, dependabot currently only handles updating dependencies which are tagged as semver, manually update the go modules. This was completed by running the commands: $ go get -u $ go mod tidy See: dependabot/dependabot-core#3017 Signed-off-by: Christopher Obbard <[email protected]>
Dependabot ignores updates to Go modules that do not have semantic version tags. See: dependabot/dependabot-core#3017. Therefore, this change replaces dependabot with a custom workflow with upgrades Go dependencies using `go get -u ./...` and creates a PR. This PR will be auto-merged using the existing logic for cadobot-generated PRs.
@EtienneM the link to pseudo-versions moved to https://go.dev/ref/mod#pseudo-versions |
With #6713 pseudo-versions are now updated to tagged versions. Let me know if you see any unexpected behavior with this change. Dependabot will not update a pseudo-version to another pseudo-version. That is still an open question, but seems like it would be quite noisy. |
Would be it feasible to offer an opt-in config setting for this type of update? |
I noticed updating to newer pseudo-versions was asked in 2020, so closing this one out as a duplicate: #2028 |
Any open issue on that? Would be great to have a reference here |
#2028 is tracking the feature request for updating dependencies to newer pseudo-versions |
Hi,
I hope the question has not been raised already but I couldn't find any relevant issues for the string "pseudo-version", "pseudo version" or "pseudoversion".
The Go language has the notion of pseudo-version. I saw a (old) blog article from Dependabot (https://dependabot.com/blog/go-modules-alpha/) stating that:
From what I experienced, Dependabot is not upgrading pseudo-version dependencies yet. Am I doing something wrong? Or is it still a work in progress?
Thanks a lot!
The text was updated successfully, but these errors were encountered: