-
Notifications
You must be signed in to change notification settings - Fork 687
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
feat: Reduce code duplicacy in chaos-workflow package #4010
feat: Reduce code duplicacy in chaos-workflow package #4010
Conversation
Please check DCO! |
1dea1d6
to
772add9
Compare
Rebased the commits and signed them 👍 |
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 🚀
cronWorkflowManifest.Labels["cluster_id"] = workflow.ClusterID | ||
cronWorkflowManifest.Labels["workflows.argoproj.io/controller-instanceid"] = workflow.ClusterID | ||
} | ||
cronWorkflowManifest.Labels = updateManifestLabels(cronWorkflowManifest.Labels, *workflow.WorkflowID, workflow.ClusterID, false) | ||
|
||
if cronWorkflowManifest.Spec.WorkflowMetadata == 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.
the if block should also be using the same updateLabels function or else if logic changes in the function or here it will cause a discrepancy in the labels.
a85dfaf
to
6fa6258
Compare
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Co-authored-by: Amit Kumar Das <[email protected]> Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
Signed-off-by: SohamRatnaparkhi <[email protected]>
c74d8be
to
97ea86a
Compare
Signed-off-by: SohamRatnaparkhi <[email protected]>
18ad2f2
to
bf885d3
Compare
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! 🚀
Proposed changes
Solves issue #4008
This PR adds 2 helper functions:
Earlier the code in these functions was separately repeated at various instances. To avoid code repetition, this PR involves creating separate helper functions for the repeated code and calling these functions at appropriate instances.
Types of changes
What types of changes does your code introduce to Litmus? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Dependency