nokia / danm

TelCo grade network management in a Kubernetes cluster
BSD 3-Clause "New" or "Revised" License
373 stars 81 forks source link

[v4.3.0] - invalid version: module contains a go.mod file, so module path must match major version #270

Closed zulh-civo closed 2 years ago

zulh-civo commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

bug

What happened:

I wanted to use the latest v4.3.0 code (specifically, the clientset types) in my Go code. But, I ran into some Go mod issues which I believe rooted from upstream/this repo.

I have this import in my Go code:

import (
    danmv1 "github.com/nokia/danm/crd/client/clientset/versioned/typed/danm/v1"
    // ...
)

// ...

When I use go get github.com/nokia/danm@v4.1.0+incompatible followed with go get github.com/nokia/danm/crd/client/clientset/versioned/typed/danm/v1, I got:

go: module github.com/nokia/danm@upgrade found (v4.1.0+incompatible), but does not contain package github.com/nokia/danm/crd/client/clientset/versioned/typed/danm/v1

I can confirm the clientset types code that I need is not there under v4.1.0 tree. But, it's available under v4.3.0 tree.

Screenshots:

Screenshot 2022-06-08 at 2 07 26 PM

Screenshot 2022-06-08 at 2 07 48 PM

Not sure if this is related, but I'll highlight it anyways - upon checking pkg.go.dev website, I can only see v4.1.0+incompatible as latest version. I'm not sure why the v4.3.0 and other versions in between are not showing on that page.

Screenshot: Screenshot 2022-06-08 at 2 00 34 PM

What you expected to happen:

How to reproduce it:

$ go get github.com/nokia/danm@v4.3.0
go: github.com/nokia/danm@v4.3.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/nokia/danm/v4")

$ go get github.com/nokia/danm/crd/client/clientset/versioned/typed/danm/v1@v4.3.0
go: github.com/nokia/danm/crd/client/clientset/versioned/typed/danm/v1@v4.3.0: github.com/nokia/danm@v4.3.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/nokia/danm/v4")

Anything else we need to know?:

Environment:

Levovar commented 2 years ago

heyyo @zulh-civo does the issue still persist or just something was messed up in your local project?

some replies nevertheless! 1: ye the generated code was not part of the repository for a long long time, we just generated it everytime from CI 2: I ultimately decided to include it exactly because I wanted to use it from other repos :) here is an example how it's done on our side: https://github.com/nokia/danm-utils/blob/master/go.mod#L7, we reference an exact commit hash 3: the pkg.go stuff is interesting, no idea about it either. @CsatariGergely you have any clue? did we miss some "release process" stuff?