-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(gomod): GOPROXY with slash doesnt work #32255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is a trailing slash a problem if parsed with it? It's valid in URLs obviously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this approach to fixing it is not robust. It's done in a separate file to where the problem occurs. We should either use a better way of joining URLs, or do the trailing slash trimming at the point of static joining
so you are saying the issue is with |
yes, that's better |
im afraid to use url joiner since the url.parser and joiner are broken if set without protocol. discussion: #30295 i haven't seen any docs indicating that the URLS set in GOPROXY can be without a protocol like |
🎉 This PR is included in version 39.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
trimm slash while parsing GOPROXY
Context
some customer run failed with this error
DEBUG: Goproxy error: trying next URL provided with GOPROXY
the URL in the error had 2 slashes // after go.
"url": "https://{XYZ.ARTIFACTORY}/go//x/y/z/v3/@v/list",
when i checked code for this i found the slash is hardcoded into this
renovate/lib/modules/datasource/go/releases-goproxy.ts
Line 132 in 4bea95b
the simple solution is to trim the slash from GOPROXY in the parser before it, as it is not necessary.
let me know if you think otherwise.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: