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

cmd/go: case-encoding of module paths produces 404s with JFrog proxy #26503

Closed
trashhalo opened this issue Jul 20, 2018 · 8 comments
Closed

cmd/go: case-encoding of module paths produces 404s with JFrog proxy #26503

trashhalo opened this issue Jul 20, 2018 · 8 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@trashhalo
Copy link

trashhalo commented Jul 20, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.11beta2 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/stephen/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/stephen/go"
GOPROXY="https://stephen.solka:xxx@upsidetravel.jfrog.io/upsidetravel/api/go/go-virtual"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/stephen/dev/mock-ean-inventory-service/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xs/bs09x7hj2jqb6hq3frfzrmkh0000gp/T/go-build527217431=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Was using vgo. Got latest version of go that had module support. Tried to go install.

What did you expect to see?

It would be able to go install (since vgo install works)

What did you see instead?

➜  mock-ean-inventory-service git:(COR-24843) ✗ go install
go: finding github.com/PotomacInnovation/libraries-go/logger v1.0.17
go: finding github.com/kr/text v0.1.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: github.com/PotomacInnovation/libraries-go/logger@v1.0.17: unexpected status (https://stephen.solka:XXXX@upsidetravel.jfrog.io/upsidetravel/api/go/go-virtual/github.com/%21potomac%21innovation/libraries-go/logger/@v/v1.0.17.info): 404 Not Found
go: error loading module requirements

note the %21 around Potomac.

go.mod

module github.com/PotomacInnovation/mock-ean-inventory-service

require (
	github.com/PotomacInnovation/libraries-go/logger v1.0.17

go.sum

➜  mock-ean-inventory-service git:(COR-24843) ✗ cat go.sum
github.com/PotomacInnovation/libraries-go/logger v1.0.17 h1:FMDlysKLfJbU6uU6O66lA4yGitH4lg+UG66uMEZuuec=
github.com/PotomacInnovation/libraries-go/logger v1.0.17/go.mod h1:HPlJj6FQkXDYm1S3X7pulbAPlp+YQKAKSaPSwBxUaHU=
github.com/aws/aws-sdk-go v1.14.26 h1:/O/k5iuM9fq3of+aMlnLy1KdE6AbbvV8/jCnbNSZGeU=
@trashhalo trashhalo changed the title cmd/go: beta 1.11beta2 module inserting spaces into proxy urls dependencies to 404 cmd/go: beta 1.11beta2 module inserting spaces into proxy urls causes 404 Jul 20, 2018
@trashhalo trashhalo changed the title cmd/go: beta 1.11beta2 module inserting spaces into proxy urls causes 404 cmd/go: beta 1.11beta2 module inserting ! into proxy urls causes 404 Jul 20, 2018
@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

You mention proxy URLs in the title. What proxy service are you using, and at what version? (Or is this reproducible without using GOPROXY?)

Module support is still experimental, so while we do try to maintain backward compatibility, the proxy protocol is still subject to change.

@bcmills bcmills 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. modules labels Jul 20, 2018
@bcmills bcmills added this to the Go1.11 milestone Jul 20, 2018
@trashhalo
Copy link
Author

trashhalo commented Jul 20, 2018

@bcmills jfrog cloud. I found this bug made its way to vgo too. I have to downgrade vgo now to golang/vgo@cc75ec0 looks like the bug got inserted in this commit. golang/vgo@2093985

Im not sure on if this exists outside of goproxy. the library its trying to pull only exists in the proxy so I cant test pulling it from github.

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

looks like the bug got inserted in this commit.

It's not a bug: it's an intentional revision to the proxy protocol. The protocol is intended to work with static file servers from any common filesystem. Module paths are (currently) case-sensitive, whereas some filesystems are not.

I don't know how JFrog has implemented their Go support, but it sounds like you'll either need to update the contents of your proxy, or file a bug against JFrog and wait for them to update to support the current version of the protocol.

@bcmills bcmills removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 20, 2018
@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

CC: @rsc @freddy33 @jbaruch

@bcmills bcmills changed the title cmd/go: beta 1.11beta2 module inserting ! into proxy urls causes 404 cmd/go: case-encoding of module paths produces 404s with JFrog proxy Jul 20, 2018
@trashhalo
Copy link
Author

trashhalo commented Jul 20, 2018

It's not a bug: it's an intentional revision to the proxy protocol

If thats true do you know which pull request introduced this breaking change?

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

https://golang.org/cl/124378 defined the encoding.
https://golang.org/cl/124379 started using it (to fix #25992).
(https://golang.org/cl/124380 is related but doesn't directly affect the proxy URLs.)
https://golang.org/cl/124795 extended the encoding to version strings.

Note that all of these changes are in pre-release software (the go repository after Go 1.10 but before Go 1.11beta2, and the vgo repository which is explicitly “a prototype of what the go command might look like”). It's true that they are breaking changes, but the things they are breaking should not be in production use yet.

@trashhalo
Copy link
Author

trashhalo commented Jul 20, 2018

Well since this is intended behavior and not truely breaking since its prerelease software//expirement, should we just close this issue? I made a issue on the jfrog cli go.

I've worked around the issue in jfrog by pushlishing the dependency all lower case

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

Sure. Thanks for making the upstream report!

@bcmills bcmills closed this as completed Jul 20, 2018
@golang golang locked and limited conversation to collaborators Jul 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants