Track ownerrefs between cluster-scoped and namespaced objects
Fixes https://github.com/argoproj/argo-cd/issues/24379
Codecov Report
:x: Patch coverage is 89.36170% with 5 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 47.82%. Comparing base (8849c3f) to head (a3fa709).
:warning: Report is 59 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pkg/cache/cluster.go | 89.36% | 3 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
- Coverage 54.26% 47.82% -6.45%
==========================================
Files 64 64
Lines 6164 6622 +458
==========================================
- Hits 3345 3167 -178
- Misses 2549 3199 +650
+ Partials 270 256 -14
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I heard some other opinions in the contributor meeting. I agree with adding the escape hatch, but I'm not sure whether we should implement "conditional enable" or "emergency disable". Environment variable? App annotation? Other thoughts?
@crenshaw-dev had an opinion I know.
Quality Gate passed
Issues
14 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
13.1% Duplication on New Code
I went ahead with implementing this as a disable flag.
I did have an idea about a possible optimization, though it may change things a little more broadly than just buildGraph.
I was thinking if IterateHierarchyV2 were to always process the global/cluster-scoped (non-)namespace slice element last, we could keep track of missing refs that we hit along the way and resolve them all at once in a single go. Sound viable?
What's next for this?