Conversation
…tion[WithBackoff]
harveyxia
commented
May 15, 2025
kdorosh
approved these changes
May 16, 2025
Contributor
karanthukral
left a comment
There was a problem hiding this comment.
generally looks good but one question that I am unclear on
karanthukral
approved these changes
May 16, 2025
jessicayuen
approved these changes
May 16, 2025
Member
jessicayuen
left a comment
There was a problem hiding this comment.
Looks good, just a question for my own understanding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💸 TL;DR
Adds new result types for modeling new FSM control flow scenarios:
DoneResultWithStatusConditionandDoneAndRequeueAfterCompletion[WithBackoff]Changes
DoneResultWithStatusConditionallows marking a state as completed with a custom status condition status (the boolean), message, and reason.Falseeven though it completed without error)DoneAndRequeueAfterCompletion[WithBackoff]allows the caller to requeue at the end of the FSM (i.e. afterReconcile()returns). This is useful for modeling scenarios where you want to requeue but also execute all subsequent FSM states. Edge case semantics:Readystatus condition as the conjunction of all other conditions. If any conditions are failed, theReadycondition's message will include the failed status conditions.ReadyconditionOther Notes
WithSkipNameValidationto the FSM builder. There's some global state that controller-runtime tracks to prevent multiple reconcilers registering with the same name.Reconciler(...) reconcile.TypedReconciler[ctrl.Request]so callers can extract the underlying controller-runtime reconciler✅ Checks
I also tested this against
reddit/achilles's suite of envtests to provide confidence that the changes to the core FSM reconciler didn't break existing behavior (see here)