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

Go module import path is broken #408

Closed
yhrn opened this issue Feb 23, 2021 · 4 comments
Closed

Go module import path is broken #408

yhrn opened this issue Feb 23, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@yhrn
Copy link

yhrn commented Feb 23, 2021

Describe the bug
The Go module import path for the new Go types and clients library released with v1.39.0 seems broken. The source is located at
github.com/GoogleCloudPlatform/k8s-config-connector/generated but the import path is github.com/GoogleCloudPlatform/k8s-config-connector

ConfigConnector Version
v1.39.0

To Reproduce

> go get github.com/GoogleCloudPlatform/k8s-config-connector/generated
go: downloading github.com/GoogleCloudPlatform/k8s-config-connector v0.4.0
go: downloading github.com/GoogleCloudPlatform/k8s-config-connector/generated v0.0.0-20210222223536-d77ffcdd23f4
go get: github.com/GoogleCloudPlatform/k8s-config-connector/generated@none updating to
        github.com/GoogleCloudPlatform/k8s-config-connector/generated@v0.0.0-20210222223536-d77ffcdd23f4: parsing go.mod:
        module declares its path as: github.com/GoogleCloudPlatform/k8s-config-connector
                but was required as: github.com/GoogleCloudPlatform/k8s-config-connector/generated

> go get github.com/GoogleCloudPlatform/k8s-config-connector          
go get: added github.com/GoogleCloudPlatform/k8s-config-connector v0.4.0

> go get github.com/GoogleCloudPlatform/k8s-config-connector@v1.39.0
go get: github.com/GoogleCloudPlatform/k8s-config-connector@v1.39.0: invalid version: unknown revision v1.39.0

Note that github.com/GoogleCloudPlatform/k8s-config-connector@v0.4.0 is just some old tag that contains nothing useful

It might be possible to do something with a replace directive in my go.mod but that seems like a really bad idea.

FYI, @spew

@yhrn yhrn added the bug Something isn't working label Feb 23, 2021
@caieo
Copy link
Contributor

caieo commented Feb 23, 2021

Hi @yhrn, glad to hear you're trying out the go types and client! This was an oversight in our release script, I have a fix on the way and we'll have it patched soon. Sorry you ran into this.

@yhrn
Copy link
Author

yhrn commented Mar 1, 2021

Hi @caieo,

With the 1.40.0 the import path now matches the actual path however there are two new problems:

  1. go.mod and go.sum are now gone, which means that the package is no longer Go modules enabled.
  2. The tag format you use 1.40.0 is not go compatible, it needs to be v1.40.0 or go won't recognize it as a semantic version, see the section called Semantic versions and modules here.
> go get github.com/GoogleCloudPlatform/k8s-config-connector@v1.40.0
go get: github.com/GoogleCloudPlatform/k8s-config-connector@v1.40.0: invalid version: unknown revision v1.40.0
> go get github.com/GoogleCloudPlatform/k8s-config-connector@1.40.0 
go: downloading github.com/GoogleCloudPlatform/k8s-config-connector v1.0.0-rc1.0.20210227060641-f158208856e7
go get: added github.com/GoogleCloudPlatform/k8s-config-connector v1.0.0-rc1.0.20210227060641-f158208856e7

As you can see it is now possible to add a dependency to the package but you get the version v1.0.0-rc1.0.20210227060641-f158208856e7, which means nothing and the lack of Go module support can also lead to future dependency problems.

@maqiuyujoyce
Copy link
Collaborator

In v1.41.0, Config Connector starts supporting version tags in the format of v0.0.0.

@yhrn
Copy link
Author

yhrn commented Mar 9, 2021

I can confirm this is now working as expected.

@yhrn yhrn closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants