argoproj / gitops-engine

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

fix: Fix argument order in resource filter #436

Closed jannfis closed 2 years ago

jannfis commented 2 years ago

The signature for the resourcesFilter function in the sync context is

resourcesFilter        func(key kube.ResourceKey, target *unstructured.Unstructured, live *unstructured.Unstructured) bool

but it's called with live and target exchanged.

This is a prerequisite for fixing https://github.com/argoproj/argo-cd/issues/8683

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

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 0 Code Smells

No Coverage information No Coverage information
1.4% 1.4% Duplication

codecov[bot] commented 2 years ago

Codecov Report

Merging #436 (f86f321) into master (6cde798) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #436   +/-   ##
=======================================
  Coverage   53.96%   53.96%           
=======================================
  Files          41       41           
  Lines        3189     3189           
=======================================
  Hits         1721     1721           
  Misses       1286     1286           
  Partials      182      182           
Impacted Files Coverage Δ
pkg/sync/sync_context.go 70.86% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.