-
Notifications
You must be signed in to change notification settings - Fork 59
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
test: stabilize case single_prometheus_replica_has_no_pdb #425
test: stabilize case single_prometheus_replica_has_no_pdb #425
Conversation
b7a28f2
to
43653da
Compare
Thanks! This is great. Would you be up for moving this to a I'd also be happy to merge this as is and refactor later. Up to you. |
Will refactor the code |
656ded2
to
6a6bcd1
Compare
@jan--f complete refactor code, please help review. |
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.
Two small comments, otherwise this looks great. Thanks!
|
||
type StackFn func(monitoringStack *stack.MonitoringStack) | ||
|
||
func SetPrometheusReplicas(replicas *int32) StackFn { |
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.
Maybe
func SetPrometheusReplicas(replicas *int32) StackFn { | |
func SetPrometheusReplicas(replicas int32) StackFn { |
And get the pointer to the int in the set function? Calls are more convenient that way.
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't agree more
"k8s.io/client-go/util/retry" | ||
) | ||
|
||
type StackFn func(monitoringStack *stack.MonitoringStack) |
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: maybe StackModifier is a slightly more descriptive name?
Refactor code and also enhance the following cases TestMonitoringStackController/single_prometheus_replica_has_no_pdb TestMonitoringStackController/Alertmanager_disabled TestMonitoringStackController/Verify_ability_to_scale_down_Prometheus
7fd2973
to
9ed6838
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lihongyan1 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 |
9ed6838
to
0efe1f1
Compare
0efe1f1
to
4bd23b7
Compare
/lgtm |
Stabilize case: TestMonitoringStackController/single_prometheus_replica_has_no_pdb
fix error "the object has been modified; please apply your changes to the latest version and try again: failed to update monitoring stack" tracked by https://issues.redhat.com/browse/COO-42