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)

Comment From: gabyhelp

Related Issues and Documentation

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

Comment From: seankhliao

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.

Comment From: hyangah

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

Comment From: dominik-przybyl-wttech

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.+

Comment From: hyangah

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?

Comment From: dominik-przybyl-wttech

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 ?

Comment From: jba

This seems to have been fixed: Golang x/pkgsite: wrong version on @latest

Comment From: hyangah

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.