Code Monkey home page Code Monkey logo

Comments (15)

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024 1

This should work now.

➤ go mod download -json go.fd.io/govpp/extras@latest
{
    "Path": "go.fd.io/govpp/extras",
    "Version": "v0.7.0",
    "Query": "latest",
    "Info": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.7.0.info",
    "GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.7.0.mod",
    "Zip": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.7.0.zip",
    "Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/[email protected]",
    "Sum": "h1:bAokcUUDzIUCnhtUmoOug+QuWZI3Erqe56J1RfBLWRc=",
    "GoModSum": "h1:VxUPq8HGQH6/9IL9saMURL3UcHsUuN8XmETuao5HA7o=",
    "Origin": {
        "VCS": "git",
        "URL": "https://github.com/FDio/govpp",
        "Ref": "refs/tags/v0.7.0",
        "Hash": "2155ba39d4353b5d5e36473edfb2268be7b5d9c8"
    }
} 

EDIT: actually, this is most likely incorrect, see next comment

from govpp.

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024 1

Setting the version does retrieve the module, but there's a retracted warning.

But, only govpp main module has retracted version. The extras does not. I believe this is precisely because of the invalid cached info in the GoProxy I described above.

Please try running:

GOPROXY=direct go get go.fd.io/govpp/[email protected]

from govpp.

sknat avatar sknat commented on August 21, 2024 1

Running

GOPROXY=direct go get go.fd.io/govpp/[email protected]

seemed to work for us in https://github.com/projectcalico/vpp-dataplane/pull/577/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R111
Thanks @ondrej-fabry

from govpp.

edwarnicke avatar edwarnicke commented on August 21, 2024

Could you provide the document that needs to be pushed up?

from govpp.

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024

@edwarnicke Could you share link to the location of source code for the site? I will open PR.

from govpp.

edwarnicke avatar edwarnicke commented on August 21, 2024

So far I've just been pushing up the raw file (since its sufficiently simple):

curl https://go.fd.io/govpp
<html><head>
    <meta name="go-import" content="go.fd.io/govpp git https://github.com/FDio/govpp">
    <meta name="go-source" content="go.fd.io/govpp     https://github.com/FDio/govpp https://github.com/FDio/govpp/tree/master{/dir} https://github.com/FDio/govpp/blob/master{/dir}/{file}#L{line}">
    <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.fd.io/govpp" />
</head></html>  

from govpp.

edwarnicke avatar edwarnicke commented on August 21, 2024

If we are going to move to having more of a site, it may make sense to build more infra around it.

from govpp.

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024

So far I've just been pushing up the raw file (since its sufficiently simple):

Right, understandable. I guess it should not be that much work to use go branch in the FD.io site repo to improve maintainability and allow collaboration. For Ligato we just based of master branch and added redirects with static HTML files for each Go module. See https://github.com/ligato/site/blob/go/static/_redirects

from govpp.

sknat avatar sknat commented on August 21, 2024

@edwarnicke do you know where this is hosted ?
We can probably push a patch, as this seems hugo-based.

from govpp.

edwarnicke avatar edwarnicke commented on August 21, 2024

@sknat I gave @ondrej-fabry access on netlify to fix it last week. I simply statically uploaded a directory tarball since it was simple before.

from govpp.

sknat avatar sknat commented on August 21, 2024

Ok works, thanks

from govpp.

edwarnicke avatar edwarnicke commented on August 21, 2024

@sknat Apologies... should have updated here as well :) Glad all is well.

from govpp.

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024

⚠️ Important Update

so... I think I might have accidentally messed up the extras module info cached in the public Go Proxy. This is because at first I have entered incorrect values for the HTML meta tags in the go.fd.io/govpp/extras and when I was testing it, it filled the Go Proxy with invalid info about the module. 😟

I believe the problem is that Go Proxy now returns the info for main GoVPP module instead of extras submodule, see here:

# listing versions WITH Go Proxy
➤ go list -json -m -versions go.fd.io/govpp/extras
{
	"Path": "go.fd.io/govpp/extras",
	"Versions": [
		"v0.6.0-alpha",
		"v0.6.0",
		"v0.7.0",
		"v0.8.0-alpha"
	]
}

# listing versions WITHOUT Go Proxy
➤ GOPROXY=direct go list -json -m -versions go.fd.io/govpp/extras
{
	"Path": "go.fd.io/govpp/extras",
	"Versions": [
		"v0.1.0"
	],
	"Origin": {
		"VCS": "git",
		"URL": "https://github.com/FDio/govpp",
		"Subdir": "extras",
		"TagPrefix": "extras/",
		"TagSum": "t1:x7xgAj5aeOC+DZu5HLiZUY3DgMQA9RRScS5l/36Vcls="
	}
}

I have pushed the tag extras/v0.1.0 to publish stable version of the extras module and without Go Proxy the latest gets picked up correctly:

# downloading latest version WITHOUT Go Proxy
➤ GOPROXY=direct go mod download -json go.fd.io/govpp/extras@latest
{
	"Path": "go.fd.io/govpp/extras",
	"Version": "v0.1.0",
	"Query": "latest",
	"Info": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.info",
	"GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.mod",
	"Zip": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.zip",
	"Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/[email protected]",
	"Sum": "h1:vY9nWLGGHD8VoEaL47sP8sQTNBWNE0mN0aERixEUzBE=",
	"GoModSum": "h1:s2FPOGIWR+p3ItFhlC2Zgbw1U5HwZxNYLffeK8Ld/kE=",
	"Origin": {
		"VCS": "git",
		"URL": "https://github.com/FDio/govpp",
		"Subdir": "extras",
		"TagPrefix": "extras/",
		"TagSum": "t1:x7xgAj5aeOC+DZu5HLiZUY3DgMQA9RRScS5l/36Vcls=",
		"Ref": "refs/tags/extras/v0.1.0",
		"Hash": "8b655acb0cc10b9f64247118295c366023980a4d"
	}
}

However with the Go Proxy it returns the same response (for govpp main module v0.7.0) as I posted in previous post.

I am afraid this means that users will most likely run into issues when adding the dependency to their Go apps:

# get latest version WITH Go Proxy
➤ go get go.fd.io/govpp/extras@latest
go: go.fd.io/govpp/[email protected]: parsing go.mod:
	module declares its path as: go.fd.io/govpp
	        but was required as: go.fd.io/govpp/extras

#  get latest version WITHOUT Go Proxy
➤ GOPROXY=direct go get go.fd.io/govpp/extras@latest
go: added go.fd.io/govpp/extras v0.1.0

Specifying the version does not help either:

# specifying v0.1.0
➤ go get go.fd.io/govpp/[email protected]
go: downloading go.fd.io/govpp v0.1.0
go: warning: go.fd.io/govpp/[email protected]: retracted by module author: Versions v0.5.0 and older use old module path git.fd.io/govpp.git
go: to switch to the latest unretracted version, run:
	go get go.fd.io/govpp/extras@latest

🩹 Available Workaround

So, please use GOPROXY=direct when adding the dependency.


PS: There is one more thing I want to try, that is publishing version that is > v0.7.0 which might force Go Proxy to consider it newer than any version from GoVPP and it might fix the incorrect module info..

from govpp.

yoursunny avatar yoursunny commented on August 21, 2024

Specifying the version does not help either:

Setting the version does retrieve the module, but there's a retracted warning.

$ go get go.fd.io/govpp/[email protected]
go: downloading go.fd.io/govpp/extras v0.1.0
go: downloading go.fd.io/govpp v0.1.0
go: warning: go.fd.io/govpp/[email protected]: retracted by module author: Versions v0.5.0 and older use old module path git.fd.io/govpp.git
go: to switch to the latest unretracted version, run:
        go get go.fd.io/govpp/extras@latest
go: added go.fd.io/govpp/extras v0.1.0

go.sum entry:

go.fd.io/govpp/extras v0.1.0 h1:vY9nWLGGHD8VoEaL47sP8sQTNBWNE0mN0aERixEUzBE=
go.fd.io/govpp/extras v0.1.0/go.mod h1:s2FPOGIWR+p3ItFhlC2Zgbw1U5HwZxNYLffeK8Ld/kE=

from govpp.

ondrej-fabry avatar ondrej-fabry commented on August 21, 2024

Closing as resolved.

from govpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.