-
Notifications
You must be signed in to change notification settings - Fork 895
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
decouple suspension of propagation and resourcebinding #5974
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5974 +/- ##
==========================================
+ Coverage 48.25% 48.26% +0.01%
==========================================
Files 664 665 +1
Lines 54749 54793 +44
==========================================
+ Hits 26417 26445 +28
- Misses 26618 26633 +15
- Partials 1714 1715 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
/assign
@@ -322,6 +322,11 @@ type BindingSnapshot struct { | |||
Clusters []TargetCluster `json:"clusters,omitempty"` | |||
} | |||
|
|||
// Suspension defines the policy for suspending of propagation and suspension of resource binding itself. | |||
type Suspension struct { | |||
*policyv1alpha1.Suspension `json:",inline"` |
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 you remind me why use a pointer type of pkg/apis/work/v1alpha2/binding_types.go
?
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.
We can seperate it's not set or set a zero value by user.
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.
One question is, if it is to understand the coupling, why not re-declar all the fields in the binding. What if ScheduleSuspension is also exposed in the PropagationPolicy in the future, according to the current processing?
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.
As @RainbowMango mentioned, pp should not expose bindingSuspension now, and we can declare an independent struct to express rb's suspension, this can be done in the future.
{ | ||
name: "false for nil dispatching", | ||
args: args{ | ||
suspension: &policyv1alpha1.Suspension{Dispatching: nil}, | ||
suspension: &workv1alpha2.Suspension{Suspension: &policyv1alpha1.Suspension{Dispatching: 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.
suspension: &workv1alpha2.Suspension{Suspension: &policyv1alpha1.Suspension{Dispatching: nil}}, | |
suspension: &workv1alpha2.Suspension{Suspension: policyv1alpha1.Suspension{Dispatching: nil}}, |
Signed-off-by: Monokaix <[email protected]>
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest The failing test is unreleated:
|
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
decouple suspension of propagation and resourcebinding, because rb and pp's suspension should be independent.
Which issue(s) this PR fixes:
Fixes #
Part of #5937
Special notes for your reviewer:
should merge this one first before #5937
Does this PR introduce a user-facing change?: