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: wrong version on @latest #68991

Closed
dominik-przybyl-wttech opened this issue Aug 21, 2024 · 8 comments
Closed

x/pkgsite: wrong version on @latest #68991

dominik-przybyl-wttech opened this issue Aug 21, 2024 · 8 comments

Comments

@dominik-przybyl-wttech
Copy link

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk

What is your user agent?

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

Screenshot

No response

What did you do?

Some time age I released new version of https://github.com/wttech/pulumi-aem in version v0.1.2. And also retracted unused versions: from v0.9.0 to v0.9.99 and v0.0.1

What did you see happen?

In https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk we discover that version v0.9.34 is latest.
But from https://proxy.golang.org/github.com/wttech/pulumi-aem/sdk/@latest we discover that version v0.1.2 is latest, what is correct.

What did you expect to see?

I exect in https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk to see only version v0.1.1 and v0.1.2 (latest)

@gabyhelp
Copy link

Related Issues and Documentation

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

@seankhliao seankhliao changed the title x/pkgsite: different latest version of github.com/wttech/pulumi-aem/sdk in pkg.go.dev and proxy.golang.org proxy.golang.org: wrong version on @latest Aug 21, 2024
@seankhliao
Copy link
Member

pkgsite is correct, using go get will also pull in v0.9.34 correctly.
retractions have to be at the highest versions to take effect.

@hyangah
Copy link
Contributor

hyangah commented Aug 21, 2024

go list -m --versions -json github.com/wttech/pulumi-aem/sdk@latest
{
	"Path": "github.com/wttech/pulumi-aem/sdk",
	"Version": "v0.9.34",
	"Query": "latest",
	"Versions": [
		"v0.1.1",
		"v0.1.2",
		"v0.9.0",
		"v0.9.1",
		"v0.9.30",
		"v0.9.31",
		"v0.9.32",
		"v0.9.33",
		"v0.9.34"
	],
	"Time": "2024-05-06T14:45:22Z",
	"GoMod": "/Users/hakim/go/pkg/mod/cache/download/github.com/wttech/pulumi-aem/sdk/@v/v0.9.34.mod",
	"GoVersion": "1.21"
}

The go command sees v0.9.34 as the latest version.
As the protocol spec says https://go.dev/ref/mod#goproxy-protocol the proxy's /@latest endpoint is not consulted if /@v/list is not empty.

https://proxy.golang.org/github.com/wttech/pulumi-aem/sdk/@v/list shows multiple versions were published so far.

If the v0.9.x versions shouldn't be used, please retract them. https://go.dev/ref/mod#go-mod-file-retract

@dominik-przybyl-wttech
Copy link
Author

dominik-przybyl-wttech commented Aug 21, 2024

I've added retract when 0.1.2 was released, it was after v0.9.+ were released.

retract (
	[v0.9.0, v0.9.99]
	v0.0.1
)

in https://github.com/wttech/pulumi-aem/blob/main/sdk/go.mod

so is there any approach to set v0.1.2 as a latest, and "remove" v0.9.+

@hyangah
Copy link
Contributor

hyangah commented Aug 21, 2024

My understanding is that the retract info should be present in the last version's go.mod (including the retracted versions). (cc correct me if it's incorrect @matloob @samthanawalla ) The last version in the list is currently v0.9.34. Have you tried to tag the latest commit with v0.9.35 (that is in [v0.9.0, v0.9.99] retract range) and publish it?

@cherrymui cherrymui added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 21, 2024
@dominik-przybyl-wttech
Copy link
Author

I've added commit with v0.9.35, now on https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk all entries are labeled as Retracted. I do not see v0.1.1 and v0.1.2, which are visible here:

go list -m --versions -json github.com/wttech/pulumi-aem/sdk
{
        "Path": "github.com/wttech/pulumi-aem/sdk",
        "Version": "v0.1.2",
        "Versions": [
                "v0.1.1",
                "v0.1.2"
        ],
        "Time": "2024-06-17T15:00:00Z",
        "Dir": "/Users/dominik.przybyl/go/pkg/mod/github.com/wttech/pulumi-aem/sdk@v0.1.2",
        "GoMod": "/Users/dominik.przybyl/go/pkg/mod/cache/download/github.com/wttech/pulumi-aem/sdk/@v/v0.1.2.mod",
        "GoVersion": "1.21"
}

What should be done to make them appear in https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk ?

@jba
Copy link
Contributor

jba commented Aug 22, 2024

This seems to have been fixed:
image

@jba jba closed this as completed Aug 22, 2024
@hyangah
Copy link
Contributor

hyangah commented Aug 22, 2024

Looks like @dominik-przybyl-wttech published a new version and pkgsite processed the newly published version. However, v0.1.1 and v0.1.2 that were published while the module was excluded from pkgsite per #67209 and before the revert request #67847 was accepted were removed and pkgsite doesn't process them again.

https://pkg.go.dev/github.com/wttech/pulumi-aem/sdk?tab=versions doesn't show v0.1.1 and v0.1.2.

I think this is a rare case - exclusion request and then revert the request. So, not worth investigating further.

@hyangah hyangah changed the title proxy.golang.org: wrong version on @latest x/pkgsite: wrong version on @latest Aug 22, 2024
@hyangah hyangah added pkgsite and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants