-
Notifications
You must be signed in to change notification settings - Fork 367
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
OCPBUGS-17113: Lazy updates for Prometheus #2395
base: main
Are you sure you want to change the base?
Conversation
@rexagod: This pull request references Jira Issue OCPBUGS-17113, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rexagod 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 |
/jira refresh |
@rexagod: This pull request references Jira Issue OCPBUGS-17113, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
484f320
to
d394434
Compare
/retest-required |
d394434
to
29846c5
Compare
/retest-required |
1 similar comment
/retest-required |
29846c5
to
564d684
Compare
/test e2e-aws-ovn-techpreview |
/label qe-approved |
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.
Thanks!
I left some comments.
5b0d83b
to
4e75b4a
Compare
pkg/client/client_test.go
Outdated
shouldUpdate: true, | ||
}, | ||
{ | ||
description: "apply no value to the existing prometheus", | ||
prometheus: &monv1.Prometheus{ | ||
TypeMeta: initialPrometheus.TypeMeta, | ||
ObjectMeta: initialPrometheus.ObjectMeta, | ||
}, | ||
shouldUpdate: true, |
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 the no defaulting approach, there won't be a difference between default and non-default applications, as both will trigger updates as compared to just the latter earlier, at the benefit of not maintaining hardcoded default values in CMO.
f71b993
to
15b56ea
Compare
/test versions |
1 similar comment
/test versions |
Makefile
Outdated
go test -run NONE -bench ^Bench -benchmem $(PKGS) | ||
|
||
.PHONY: test | ||
test: test-unit test-rules test-e2e | ||
|
||
.PHONY: test-unit | ||
test-unit: | ||
go test -race -short $(PKGS) -count=1 | ||
go test -run ^Test -race -short $(PKGS) -count=1 | ||
|
||
.PHONY: test-e2e | ||
test-e2e: KUBECONFIG?=$(HOME)/.kube/config | ||
test-e2e: | ||
go test -v -timeout=150m ./test/e2e/ --kubeconfig $(KUBECONFIG) | ||
go test -run ^Test -v -timeout=150m ./test/e2e/ --kubeconfig $(KUBECONFIG) |
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.
Are the -run
parameters really needed? I thought go test
already only runs functions that start with Test
and go run -bench .
runs the Benchmark
prefixed tests.
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 verified that the tests and benches can indeed be run using go test
and go test -bench=.
, not sure why I assumed otherwise. Sorry for the confusion here, will revert.
if err != nil { | ||
return fmt.Errorf("updating Prometheus object failed: %w", err) | ||
return didUpdate, fmt.Errorf("updating Prometheus object failed: %w", err) |
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 find the interface a bit confusing. The bool is ignored in all call sites except for tests. But the tests only test shouldUpdate=true and err != nil
. Its not clear what that scenario actually means and why CreateOrUpdatePrometheus
needs to add this to its signature.
We should at least have some clarifying comments.
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.
Added a comment to clarify the matrix formed by the return values. I've added it at the function header since the wrapper preserves similar expectations and for more visibility. LMK if it looks odd and I'll move it in.
80dc2e3
to
30dc110
Compare
/test e2e-aws-ovn-single-node Flaking. |
Incorporate openshift/library-go#1575 downstream. Signed-off-by: Pranshu Srivastava <[email protected]>
30dc110
to
70fc333
Compare
Blocked by openshift/library-go#1823. |
EDIT: Will update this PR once openshift/library-go#1833 is in. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/remove-lifecycle stale |
@rexagod: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Incorporate openshift/library-go#1575 downstream.