Giter Club home page Giter Club logo

Comments (11)

jayunit100 avatar jayunit100 commented on July 20, 2024

reproducing

  1. mkdir lars
  2. cp examples/print-state/main.go lars/
  3. cd lars ; go mod init test.com/example
  4. observe that the mod init fails, bc of our attempt to import k8s.io/[email protected]
➜  lars  go get sigs.k8s.io/kpng/client
go: downloading sigs.k8s.io/kpng v0.0.0-20210813170222-0c0a3c81012c
go get: sigs.k8s.io/kpng@none updating to
        sigs.k8s.io/[email protected] requires
        k8s.io/[email protected] requires
        k8s.io/[email protected]: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

from kpng.

jayunit100 avatar jayunit100 commented on July 20, 2024

kubernetes/kubernetes#79384 <-- we'll need to fix this

from kpng.

uablrek avatar uablrek commented on July 20, 2024

We must not require backends consume k8s.io/kubernetes as a module, see kubernetes/kubernetes#79384 (comment)

It might be that kpng itself must do that, but definitely not a backend!

from kpng.

uablrek avatar uablrek commented on July 20, 2024

I think the problem is "k8s.io/klog". It is a K8s internal thing and MUST NOT be required by out-of-tree backends.

from kpng.

uablrek avatar uablrek commented on July 20, 2024

@jayunit100 Please remove make kpng vendorable from the title. This is not about vendoring, it's about go modules. (as much as I love go I hate vendoring)

from kpng.

jayunit100 avatar jayunit100 commented on July 20, 2024

tried to remove klog from the client but, for some reason even though the client doesnt depend on k8s.io, still seeing:

➜  lars go mod tidy
go: found sigs.k8s.io/kpng/client in sigs.k8s.io/kpng v0.0.0-00010101000000-000000000000
go: sigs.k8s.io/[email protected] requires
        k8s.io/[email protected] requires
        k8s.io/[email protected]: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

reproduce with

➜  lars cat go.mod
module test.com/example

go 1.17

replace sigs.k8s.io/kpng => ../kpng

from kpng.

uablrek avatar uablrek commented on July 20, 2024

It still doesn't work. Example:

cp -r examples/pipe-exec/ /tmp
cd /tmp/pipe-exec
rm -f go.mod go.sum
go mod init github.com/kubernetes-sigs/kpng/examples/pipe-exec
go mod tidy
go: finding module for package sigs.k8s.io/kpng/client
go: found sigs.k8s.io/kpng/client in sigs.k8s.io/kpng/client v0.0.0-20211015205115-eb27050d1b40
go: downloading sigs.k8s.io/kpng/api v0.0.0-00010101000000-000000000000
github.com/kubernetes-sigs/kpng/examples/pipe-exec/cmd/kpng-callout imports
        sigs.k8s.io/kpng/client imports
        sigs.k8s.io/kpng/api/localnetv1: sigs.k8s.io/kpng/[email protected]: invalid version: unknown revision 000000000000

/open

from kpng.

uablrek avatar uablrek commented on July 20, 2024

/reopen

from kpng.

k8s-ci-robot avatar k8s-ci-robot commented on July 20, 2024

@uablrek: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from kpng.

mcluseau avatar mcluseau commented on July 20, 2024

@uablrek I've gone through a cleanup step on all this, please try again :)

from kpng.

uablrek avatar uablrek commented on July 20, 2024

Now it works 👍

from kpng.

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.