0

I am using knative.dev/client v0.42.0 and I am trying to upgrade it to 0.47.0. I am using also:

  • knative.dev/networking v0.0.0-20251103014656-7d4a19889854
  • knative.dev/pkg v0.0.0-20251104154049-5037c4760829
  • knative.dev/serving v0.47.0.

When I execute go mod tidy, I get an error:

knative.dev/client/pkg/serving/v1: knative.dev/client/[email protected]: invalid version: unknown revision 000000000000
knative.dev/client/pkg/wait: knative.dev/client/[email protected]: invalid version: unknown revision 000000000000

I do not have any replace statements in my go.mod, it is pretty straight forward, but when I open the go.mod of knative/client(https://github.com/knative/client/blob/main/go.mod) I see that they use replace exactly for that. Obviously it can not work with my project because I do not have such pkg folder.

module knative.dev/client

go 1.24.0

require (
    github.com/spf13/cobra v1.8.1
    gotest.tools/v3 v3.3.0
    k8s.io/api v0.33.5
    k8s.io/apimachinery v0.33.5
    k8s.io/code-generator v0.33.5
    knative.dev/client/pkg v0.0.0-00010101000000-000000000000
    knative.dev/hack v0.0.0-20251021013703-4fae78067103
    knative.dev/networking v0.0.0-20251030154838-4115314567bb
    knative.dev/pkg v0.0.0-20251022152246-7bf6febca0b3
    knative.dev/serving v0.47.0
    sigs.k8s.io/yaml v1.6.0
)

replace knative.dev/client/pkg => ./pkg

So, am I using it wrongly or what? Does anybody have an idea how I can make it work without making a local copy of the repo? Thank you.

6
  • 1
    How came you've got that v0.0.0-00010101000000-000000000000 version in your go.mod file? The part between the two dashes (the middle one) is a timestamp, and the rightmost part is the commit hash. Obviously, both are invalid, so the error «unknown revision 000000000000» (ostensibly reported by some invocation of the go tool) is sort of expected as it cannot find the commit with that hash in the repository hosting the knative.dev/client/pkg package. Commented Nov 7 at 15:55
  • 2
    A replace directive doesn't apply when using a library, so you don't ned the ./pkg directory. Something else is going on, I'm guessing that you have some incompatible combination of knative.dev packages, or are using one which isn't meant to be externally imported. Can you remove them all from your go.mod and get a new working set with go mod tidy? Commented Nov 7 at 17:54
  • @kostix I do not have v0.0.0-00010101000000-000000000000 in my go.mod file. It is in the go.mod of knative.dev/client if you check it, you will see it. But when I do "go mod tidy" my go mod looks for it. Commented Nov 10 at 10:02
  • @Mr_Pink I use only 4 knative.dev libraries: knative.dev/networking, knative.dev/pkg, knative.dev/serving and knative.dev/client. All except the client are latest. In that configuration and knative.dev/client 0.42.0, everything is working, but now I am trying to upgrade the client to 0.47.0, even with 0.43.0 has the same problem. Commented Nov 10 at 10:03
  • 1
    But to my question, can you remove all the entries from go.mod and have it get a working set of versions with go mod tidy? Otherwise you can open an issue with the project about their invalid go.mod entry Commented Nov 10 at 14:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.