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

x/pkgsite/devtools/cmd/seeddb: trim spaces from version list #71141

Closed
jeanbza opened this issue Jan 6, 2025 · 4 comments
Closed

x/pkgsite/devtools/cmd/seeddb: trim spaces from version list #71141

jeanbza opened this issue Jan 6, 2025 · 4 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Milestone

Comments

@jeanbza
Copy link
Contributor

jeanbza commented Jan 6, 2025

What is the URL of the page with the issue?

https://artifacts.netflix.net/api/go/goproxy (private jfrog artifactory go module proxy)

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Screenshot

No response

What did you do?

GO_MODULE_PROXY_URL=https://artifacts.netflix.net/api/go/goproxy \
    go run devtools/cmd/seeddb/main.go -keep_going=true

What did you see happen?

seeddb: Info: Error executing fetch: proxy.Client.Info("github.netflix.net/example.com/foo", "v1.65.0 "): Client.readBody("github.netflix.net/corp/ftl-proxy", "v1.65.0 ", "info"): executeRequest(ctx, "https://artifacts.netflix.net/api/go/goproxy/github.netflix.net/example.com/foo/@v/v1.65.0 .info"): "{\n  \"errors\" : [ {\n    \"status\" : 404,\n    \"message\" : \"Could not find resource\"\n  } ]\n}": not found (code 404)

What did you expect to see?

seeddb (and co) should strip the space suffix.


Explanation: jFrog Artifactory returns an extra space after versions

The response returned from a version list query contains an extra space after the versions. Ex https://artifacts.netflix.net/api/go/goproxy/github.netflix.net/example.com/foo/@v/list return v0.0.7 not v0.0.7.

The golang proxy, in contrast, does not do that. Ex https://proxy.golang.org/github.com/googleforgames/agones/@v/list returns v1.9.0 (no trailing space).

This breaks a pkgsite assumption. It takes those versions and constructs a path with a .info suffix to download things like https://artifacts.netflix.net/api/go/goproxy/github.netflix.net/example.com/foo/@v/v0.0.7.info. But since there's a space, that url actually becomes https://artifacts.netflix.net/api/go/goproxy/github.netflix.net/example.com/foo/@v/v0.0.7 .info which is malformed.

@jeanbza jeanbza added the pkgsite label Jan 6, 2025
@gopherbot gopherbot added this to the Unreleased milestone Jan 6, 2025
@jeanbza
Copy link
Contributor Author

jeanbza commented Jan 6, 2025

@seankhliao
Copy link
Member

Shouldn't this be an Artifactory bug for returning extraneous output?

@gabyhelp
Copy link

gabyhelp commented Jan 6, 2025

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@seankhliao seankhliao changed the title x/pkgsite: versions list with spaces x/pkgsite/devtools/cmd/seeddb: trim spaces from version list Jan 7, 2025
@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 7, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Jan 7, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/640655 mentions this issue: internal/proxy: clean versions returned with spaces

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants