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

feat: selective sync (#3877) #5347

Merged
merged 3 commits into from Jan 29, 2021
Merged

Conversation

kshamajain99
Copy link
Contributor

@kshamajain99 kshamajain99 commented Jan 28, 2021

Signed-off-by: kshamajain99 kshamajain99@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • My build is green (troubleshooting builds).

issue: #3877
gitops-engine changes: argoproj/gitops-engine#213

This feature applies only out-of-sync resources when ApplyOutOfSync=true option is provided by user.

Test performed:

Scenario: For an application with 10 deployments and 1 svc, deleting svc and syncing entire application (performing same action)

With ApplyOutOfSync=true enabled

INFO[0040] sync/terminate complete              application=guestbook duration=507.61639ms syncId=00001-NPWVT

Without ApplyOutOfSync=true enabled

INFO[0114] sync/terminate complete              application=guestbook duration=1.983608856s syncId=00002-orWNj

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.

go.mod needs to be updated once the change in gitops-engine is merged.

controller/sync.go Outdated Show resolved Hide resolved
Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
controller/sync.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM. Merging after gitops engine reference is updated to argoproj/gitops-engine#213

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #5347 (8c2be96) into master (00f53b5) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5347      +/-   ##
==========================================
- Coverage   41.06%   41.02%   -0.04%     
==========================================
  Files         136      136              
  Lines       18384    18510     +126     
==========================================
+ Hits         7549     7594      +45     
- Misses       9755     9832      +77     
- Partials     1080     1084       +4     
Impacted Files Coverage Δ
controller/sync.go 67.47% <ø> (ø)
controller/state.go 69.64% <100.00%> (-5.65%) ⬇️
server/application/broadcaster.go 71.42% <0.00%> (-7.15%) ⬇️
server/application/application.go 28.37% <0.00%> (-0.33%) ⬇️
controller/appcontroller.go 53.57% <0.00%> (-0.12%) ⬇️
pkg/apis/application/v1alpha1/types.go 56.37% <0.00%> (-0.07%) ⬇️
server/session/ratelimiter.go 100.00% <0.00%> (ø)
server/account/account.go 69.16% <0.00%> (+0.74%) ⬆️
cmd/argocd-util/commands/apps.go 38.91% <0.00%> (+1.34%) ⬆️
... and 1 more

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 00f53b5...8c2be96. Read the comment docs.

@alexmt alexmt merged commit baa0f2e into argoproj:master Jan 29, 2021
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this pull request Apr 15, 2021
* selective sync

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
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.

None yet

4 participants