-
Notifications
You must be signed in to change notification settings - Fork 9
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
Finish implementing deferred input rollouts #148
Conversation
api/v1/composition.go
Outdated
@@ -91,6 +92,10 @@ type Synthesis struct { | |||
|
|||
// InputRevisions contains the versions of the input resources that were used for this synthesis. | |||
InputRevisions []InputRevisions `json:"inputRevisions,omitempty"` | |||
|
|||
// Deferred is true when this synthesis was the result of a deferred rollout, | |||
// caused by a synthesizer of (deferred) input change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This phrasing is a bit unclear
@@ -64,7 +64,7 @@ func runController() error { | |||
flag.StringVar(&synconf.PodServiceAccount, "synthesizer-pod-service-account", "", "Service account name to be assigned to synthesizer Pods.") | |||
flag.BoolVar(&debugLogging, "debug", true, "Enable debug logging") | |||
flag.DurationVar(&watchdogThres, "watchdog-threshold", time.Minute*5, "How long before the watchdog considers a mid-transition resource to be stuck") | |||
flag.DurationVar(&rolloutCooldown, "rollout-cooldown", time.Second*2, "How long before an update to related resource (synthesizer, bindings, etc.) will trigger a composition's re-synthesis") | |||
flag.DurationVar(&rolloutCooldown, "rollout-cooldown", time.Minute, "How long before an update to a related resource (synthesizer, bindings, etc.) will trigger a second composition's re-synthesis") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the "second" here means to imply that it only affects compositions that have been synthesized at least once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right- the first synthesis will always be non-deferred, essentially because the composition's generation will transition from zero to one.
docs/reference.md
Outdated
|
||
- All effected compositions are marked as pending resynthesis immediately | ||
- A maximum of one composition pending resynthesis can begin resynthesis per cooldown period | ||
- The next pending composition can start after the cooldown period has expired AND all resynthesis has completed or been retried at least once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd assume we can also move on to the next one if there's a terminal error? I'll probably find this out when I read the code 😄
} | ||
|
||
oldComp, ok := ue.ObjectOld.(*apiv1.Composition) | ||
if !ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this ever happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous resource isn't sent from the server in watch events, so (if memory serves 😬 ) it's populated with the last version in the informer cache when the new version is received. So it can be nil if the process has crashed.
Replaces the existing rollout controller with a new implementation that implements slightly nicer semantics (see reference docs for details).