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
KEP-29: Introducing operator dependency cycle detection to the instance controller #1559
Conversation
…oller Summary: Operator dependencies cycle detection is now part of the instance controller reconciliation. We execute the check for the top-level instances only, since the lower-level instances are already take care of. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
@@ -222,14 +221,3 @@ type InstanceList struct { | |||
func init() { | |||
SchemeBuilder.Register(&Instance{}, &InstanceList{}) | |||
} | |||
|
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.
Not used
// In (1), i.Spec.PlanExecution.PlanName is set directly when the user updates the instance and reset **after** the plan | ||
// is terminal | ||
// In (2) i.Spec.PlanStatus is updated **AFTER** the instance controller is done with the reconciliation call | ||
func (i *Instance) GetScheduledPlan() *PlanStatus { |
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.
Not used
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.
LGTM overall. But needs tests to ensure that changes to the dependency checker won't break the new package resolver.
@@ -50,6 +50,8 @@ import ( | |||
"github.com/kudobuilder/kudo/pkg/engine/renderer" | |||
"github.com/kudobuilder/kudo/pkg/engine/task" | |||
"github.com/kudobuilder/kudo/pkg/engine/workflow" | |||
"github.com/kudobuilder/kudo/pkg/kudoctl/packages" |
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.
With package handling no longer exclusive to the CLI, let's move the packages
folder up in the package hierarchy. pkg/kudoctl/packages
-> pkg/packages
.
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 don't mind but let's do it in a separate PR
return &packages.Package{ | ||
Resources: &packages.Resources{ | ||
Operator: o, | ||
OperatorVersion: ov, | ||
Instance: nil, | ||
}, | ||
Files: nil, |
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.
This is making the assumption that the dependency resolver will only parse the OperatorVersion
of a package -- which it currently does. We need to make sure that this assumption is covered by a test that would fail if, e.g., the dependency resolver starts to parse Instance
as well.
additionally removed `KudoOperatorTask.OperatorName` since we don't need it anymore. Fixed a few other issue too. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
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.
This is looking great!
I'm not sure about the kind
comparison in IsChildInstance
though. Please add a comment explaining why this works.
Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
…ce controller (#1559) Summary: Operator dependencies cycle detection is now part of the instance controller reconciliation. We execute the check for the top-level instances only since the lower-level instances are already take care of. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com> (cherry picked from commit d01b859)
…ce controller (#1559) (#1567) Summary: Operator dependencies cycle detection is now part of the instance controller reconciliation. We execute the check for the top-level instances only since the lower-level instances are already take care of. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com> Fixes #1513
Summary:
Operator dependencies cycle detection is now part of the instance controller reconciliation. We execute the check for the top-level instances only since the lower-level instances are already taken care of.
Signed-off-by: Aleksey Dukhovniy alex.dukhovniy@googlemail.com