Code Monkey home page Code Monkey logo

Comments (4)

ghemawat avatar ghemawat commented on July 28, 2024 1

See #866

from pprof.

ghemawat avatar ghemawat commented on July 28, 2024

Questions for pohly:

  1. Can you articulate the concrete issues that would arise for Kubernetes from keeping chromedp (and others) as test-only dependencies?
  2. How does K8 dependency checking work: is it Go package level, or Go module level. (If it is based on looking at go.mod and go.sum files, it is module level).

Details

We get much better testing using chromedp, so that will be hard to remove. The good thing is that it is a test-only thing, but so should not affect any user of Kubernetes at runtime.

Moving to a separate package may not suffice: go.mod and go.sum are per-module so the dependencies will still stick around even if things are in a separate package but in the same Go module? Though that depends on how K8 is controlling dependencies. If the K8 dependency checking is at the package level, moving to a separate package may suffice. If the K8 checking is actually looking at go.mod and go.sum files, moving to a separate package won't help.

An alternative that may work is to create a separate Go module inside the Git repository and move the chromedp based tests to that module. This will require at least some trade-offs:

  1. Github actions will need to be updated to build and test multiple modules.
  2. User workflows like go test ./... will have to change to also test other modules.

from pprof.

pohly avatar pohly commented on July 28, 2024

Can you articulate the concrete issues that would arise for Kubernetes from keeping chromedp (and others) as test-only dependencies?

Kubernetes doesn't really distinguish between code and test dependencies. If a dependency of Kubernetes depends on github.com/mailru/easyjson that's a problem because it becomes a dependency of the Kubernetes code base as a whole. The practical implications are lower, but it's still a dependency and needs case-by-case analysis instead of being able to not accept it as dependency at all.

chromedp currently doesn't raise any red flags. I suppose it just makes some of the Go tooling slower because it needs to check out more code when doing dependency checks and updates.

How does K8 dependency checking work: is it Go package level, or Go module level.

I suspect it depends and I am not an expert in that area. If you want to know the gory details, the tool which flagged the problem is https://github.com/kubernetes/kubernetes/tree/master/cmd/dependencyverifier.

Moving to a separate package may not suffice

Right, I meant module.

from pprof.

pohly avatar pohly commented on July 28, 2024

The Kubernetes folks are not happy:

Direct Dependencies: 187 
-Transitive Dependencies: 328 
-Total Dependencies: 368 
+Transitive Dependencies: 334 
+Total Dependencies: 374 
 Max Depth Of Dependencies: 19 
 All dependencies:

from pprof.

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.