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

Add ability to resync stacks periodically #243

Merged
merged 5 commits into from
Dec 15, 2021
Merged

Conversation

viveklak
Copy link
Contributor

Proposed changes

As mentioned in #242, the change here allows marking stacks as requiring periodic resync. This essentially builds on top branch polling support added in #162 by making the polling frequency configurable with resyncFrequencySeconds (with the limit that the quickest frequency supported is 60 seconds). By setting continueResyncOnCommitMatch - the operator will try a full resync instead of halting if the last known successful commit matches the current commit of the repository.

Related issues (optional)

Fixes #242

@viveklak viveklak requested a review from lblackstone December 12, 2021 22:52
Comment on lines +265 to +267
if sess.stack.ResyncFrequencySeconds != 0 && sess.stack.ResyncFrequencySeconds < 60 {
resyncFreqSeconds = 60
}
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason to set 60 seconds as the minimum? I think it's a reasonable default, but it seems like we could allow users to opt into a shorter interval.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am a little concerned about the overhead of having to checkout and then cleanup resources around each sync. There is probably some low-lift caching we can do here but given current use cases 60 seconds seems like an acceptable limit to place for now.

@viveklak viveklak merged commit 9c4b9fc into master Dec 15, 2021
@viveklak viveklak deleted the vl/PeriodicResync branch December 15, 2021 20:19
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.

Periodic re-sync for stacks
3 participants