-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitting configmap package to avoid heavy dependencies #1851
Splitting configmap package to avoid heavy dependencies #1851
Conversation
851bd5a
to
7ded756
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #1851 +/- ##
==========================================
- Coverage 69.06% 68.02% -1.04%
==========================================
Files 209 223 +14
Lines 8786 9471 +685
==========================================
+ Hits 6068 6443 +375
- Misses 2448 2703 +255
- Partials 270 325 +55
Continue to review full report at Codecov.
|
7ded756
to
05d0484
Compare
configmap/nodep_test.go
Outdated
nodep.AssertNoDependency(t, map[string]sets.String{ | ||
"knative.dev/pkg/configmap": sets.NewString( | ||
"k8s.io/client-go/informers", | ||
), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- how does this affect test duration?
- can we avoid the package name
knative.dev/pkg/configmap
- do we have instances where binaries are depending on the configmap water interface but don't have informers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Test took 17s
-
Not AFAIK, I also specifically put this into
package configmap_test
to avoid polluting its dependencies (which might make this harder). -
What I eyeballed yesterday showed that this wasn't pulling in the
configmap.Watcher
, but other things like helper functions for parsing configmap keys, and constants. I need to pull this into Serving today and see how it affects the QP dep graph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is your feeling that exclusion list is going to be smaller, or the allow list? Just thinking about which way we think it's easier to create these tests. If we use exclusion list, then any new dependency is allowed by default. I wonder if just like we have test coverage, we could also in our actions do things like:
- show the resulting binary size changes
- show the resulting binary dep deltas
etc.
Neat stuff indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this package depcheck
here: #1853
We can add other assertions about the dependency graph (e.g. AssertOnlyDeps
), which I could see being very useful for our most widely used libraries. However, generally I think this will be prohibitive to maintain for non-leaf libraries.
eab0438
to
3ad9fb1
Compare
Related: knative/serving#9957 |
|
🙃 I was going off of the test timing on Prow. |
lol that's not 17s |
why is prow so slow? |
Has it ever been fast? |
also @mattmoor run |
I've never run The test wasn't cached, or it wouldn't print the time. 🤷 |
|
I'm going to wait on this until after the release cut because it contains breaking changes, and we won't unlock the bigger win until we remove |
3ad9fb1
to
59aa3ca
Compare
/test pull-knative-pkg-unit-tests prometheus export flake 🙃 |
I staged PRs for the three broken downstream repositories. Tekton has a couple places to fixup, but they are just in test code. |
/lgtm |
/unhold |
/hold
Abusing the downstream test to see what breaks 🤞