Skip to content
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

fix: correctly compare application destinations with inferred cluster URL #4937

Merged
merged 1 commit into from Dec 1, 2020

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Dec 1, 2020

Fixes #4926

Argo CD incorrectly performs full app reconciliation if app destination contains cluster name instead of cluster URL

Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com

… URL

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #4937 (fb42eb2) into master (345c77a) will decrease coverage by 0.10%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4937      +/-   ##
==========================================
- Coverage   41.44%   41.34%   -0.11%     
==========================================
  Files         128      128              
  Lines       17666    17695      +29     
==========================================
- Hits         7322     7316       -6     
- Misses       9292     9330      +38     
+ Partials     1052     1049       -3     
Impacted Files Coverage Δ
pkg/apis/application/v1alpha1/types.go 56.20% <50.00%> (-0.65%) ⬇️
controller/appcontroller.go 50.56% <0.00%> (-1.92%) ⬇️
cmd/argocd/commands/app.go 6.80% <0.00%> (+0.28%) ⬆️

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 345c77a...fb42eb2. Read the comment docs.

@alexmt alexmt added this to the v1.8 milestone Dec 1, 2020
@@ -2398,6 +2398,17 @@ func (source *ApplicationSource) ExplicitType() (*ApplicationSourceType, error)

// Equals compares two instances of ApplicationDestination and return true if instances are equal.
func (dest ApplicationDestination) Equals(other ApplicationDestination) bool {
// ignore destination cluster name and isServerInferred fields during comparison
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to say that "ignore destination cluster URL" because we are setting dest.Server = ""?

Copy link
Contributor

@mayzhang2000 mayzhang2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexmt alexmt merged commit c108e2f into argoproj:master Dec 1, 2020
@alexmt alexmt deleted the 4926-dest-equal branch December 1, 2020 18:20
alexmt pushed a commit that referenced this pull request Dec 1, 2020
… URL (#4937)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
rbreeze pushed a commit that referenced this pull request Jan 12, 2021
… URL (#4937)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Remington Breeze <remington@breeze.software>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constant git requests on v1.8.0-rc1
4 participants