| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
There was a problem hiding this comment.
This PR aims to improve the Golang autodiscovery pipeline generation so that modules pinned to Go pseudo-versions don’t break version filtering and can still be updated correctly.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/plugins/autodiscovery/golang/utils.go | Adds pseudo-version detection helper and regex. |
| pkg/plugins/autodiscovery/golang/dependency.go | Overrides versionfilter kind/pattern when a dependency (or replace) uses a pseudo-version. |
| pkg/plugins/autodiscovery/golang/utils_test.go | Updates search expectations and adds unit tests for pseudo-version detection. |
| pkg/plugins/autodiscovery/golang/main_test.go | Adds an autodiscovery fixture test for pseudo-version manifest generation. |
pkg/plugins/autodiscovery/golang/dependency.go:178
goModuleVersionPattern := g.versionFilter.Pattern
goModuleVersionKind := g.versionFilter.Kind
switch isPseudoVersion(replace.NewVersion) {
case false:
goModuleVersionPattern, err = g.versionFilter.GreaterThanPattern(replace.NewVersion)
if err != nil {
logrus.Debugf("skipping golang module %q due to: %s", replace.NewPath, err)
continue
}
case true:
// If the new version is a pseudo-version,
// we cannot apply a version filter pattern as
// golang registry will only return one version for this module.
logrus.Debugf("Module %q uses a pseudo-version %q, so ignoring version filter for this module as the registry will only return one version", replace.NewPath, replace.NewVersion)
goModuleVersionKind = "latest"
goModuleVersionPattern = ""
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
| Back | FazBrowse Home | New Git URL |
Fix pseudo version in golang autodiscovery.
If a go module uses a pseudo version then Updatecli override the version filter to handle it.
A pseudo version looks like "v0.0.0-20260209031235-2402fdf4a9ed"
Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
Potential improvement