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: add quiescenceRun flag to avoid render loops #2010

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mismithhisler
Copy link
Member

When quiescence is configured and there are multiple templates, they will trigger eachothers quiescence timers indefinitely. This can be avoided by not ticking the timer of other templates when an individual template's timer fires.

Fixes: GH #1427, GH #20618

When quiescence is configured and there are multiple templates, they
will trigger eachothers quiescence timers indefinitely. This can be
avoided by not ticking the timer of other templates when an individual
template's timer fires.
@mismithhisler mismithhisler requested a review from a team as a code owner December 12, 2024 14:55
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

This looks like the right design @mismithhisler. Is it feasible to add tests to demonstrate the bad behavior and the fix?

@mismithhisler
Copy link
Member Author

This looks like the right design @mismithhisler. Is it feasible to add tests to demonstrate the bad behavior and the fix?

If this looks like it's in the ballpark, I think adding a test should be feasible.

@mismithhisler
Copy link
Member Author

@tgross I've added a unit test for this behavior. If you remove the logic for checking quiescenceRun in runTemplate this test will fail due to extra renderings from the render loop.

@mismithhisler mismithhisler force-pushed the fix-quiescence-timer-cycle branch from 96ff8f5 to 0e787aa Compare December 12, 2024 18:08
tgross
tgross previously approved these changes Dec 12, 2024
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! I've left some comments that are more like questions, but should be good to merge if you resolve those.

manager/runner_test.go Outdated Show resolved Hide resolved
manager/runner_test.go Show resolved Hide resolved
manager/runner_test.go Show resolved Hide resolved
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM!

@Esity
Copy link

Esity commented Dec 22, 2024

Is there any ETA for merge and release on this one?

@mismithhisler
Copy link
Member Author

@Esity We're working on getting this merged, no ETA at the moment but I'll try to keep this updated. Sorry for the delay.

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.

consul-template:master spins with multiple templates, quiescence timers
3 participants