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: disable reconciliation if timeout.reconciliation is set to 0 #6406

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Jun 4, 2021

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

Closes #1399
Closes #6357

PR allows disabling app reconciliation if timeout.reconciliation setting is set to 0

@alexmt alexmt requested a review from jannfis June 4, 2021 23:12
@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #6406 (54d01a3) into master (2eb6b3b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6406   +/-   ##
=======================================
  Coverage   41.01%   41.01%           
=======================================
  Files         152      152           
  Lines       20088    20088           
=======================================
  Hits         8239     8239           
  Misses      10716    10716           
  Partials     1133     1133           

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 e444575...54d01a3. Read the comment docs.

var resyncDuration time.Duration
if appResyncPeriod == 0 {
// Re-sync should be disabled if period is 0. Set duration to a very long duration
resyncDuration = time.Hour * 24 * 365
Copy link
Member

Choose a reason for hiding this comment

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

I haven't looked at the code, but how does the controller figure out when to reconcile again? I am assuming it takes the timestamp from application's .status.reconciledAt and checks whether now - reconciledAt > resyncDuration, right?

I am wondering whether it's sufficient to set the resyncDuration to a year. I am imagining the following (admittedly, very far edge) scenario:

  • user has 1000 apps that get synced once
  • user disables resync
  • no further syncs happen (e.g. applications were synced once, never changed)
  • after a year, appSyncPeriod expires and apps will get resynced

That might end up in some very nasty surprise. A year is not that long of a period. Maybe we should change it to 100 years? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree. 100 years sounds pretty safe :) updated

Choose a reason for hiding this comment

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

Then the surprise will be for future generations still using argocd :)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt force-pushed the 1399-disable-reconciliation branch from 0489ddb to 54d01a3 Compare June 7, 2021 20:46
Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@alexmt alexmt merged commit 9adba69 into argoproj:master Jun 8, 2021
@alexmt alexmt deleted the 1399-disable-reconciliation branch June 8, 2021 15:57
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jun 25, 2021
@alexmt alexmt removed the needs-verification PR requires pre-release verification label Aug 12, 2021
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.

reconciliation timeout is too aggressive. Option to disable polling
3 participants