argoproj / gitops-engine

Democratizing GitOps
https://pkg.go.dev/github.com/argoproj/gitops-engine?tab=subdirectories
Apache License 2.0
1.68k stars 252 forks source link

fix: Only consider resources which supports appropriate verb for any given operation #423

Closed jannfis closed 2 years ago

jannfis commented 2 years ago

This will consider the verbs supported by the API any GVK resolves to.

Fixes #422

Signed-off-by: jannfis jann@mistrust.net

codecov[bot] commented 2 years ago

Codecov Report

Merging #423 (b87a216) into master (f9456de) will increase coverage by 0.24%. The diff coverage is 62.50%.

@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
+ Coverage   54.12%   54.37%   +0.24%     
==========================================
  Files          41       41              
  Lines        3104     3110       +6     
==========================================
+ Hits         1680     1691      +11     
+ Misses       1259     1252       -7     
- Partials      165      167       +2     
Impacted Files Coverage Δ
pkg/utils/kube/resource_ops.go 0.00% <0.00%> (ø)
pkg/utils/kube/ctl.go 6.70% <16.66%> (+1.76%) :arrow_up:
pkg/sync/sync_context.go 71.10% <100.00%> (ø)
pkg/utils/kube/kube.go 39.32% <100.00%> (+3.69%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f9456de...b87a216. Read the comment docs.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
4.3% 4.3% Duplication

jannfis commented 2 years ago

I have cherry-picked this change into release-0.7

I want to pull this change into an Argo CD v2.4.z release after the current code freeze period.