-
Notifications
You must be signed in to change notification settings - Fork 551
fix(openshift): use env var instead of clusterversion status #2817
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
fix(openshift): use env var instead of clusterversion status #2817
Conversation
8b88857
to
4bc71f3
Compare
4bc71f3
to
8064bd3
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.
Looks good. Nice work.
@tylerslaton Can you investigate those unit test failures:
Those test failures seem relevant to these set of changes. |
Yep, been doing that this morning and should have a fix out soon. |
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.
Quick passthrough of the changes here. I'm a bit hesitant with using package-level variables here, and noted some comments inline.
IIRC, this controller watches the ClusterVersion resource: is that watch still applicable in this new implementation?
There is no longer a need to watch the ClusterVersion resource, you're right. Let me see if there is any dead code revolving around that. |
b436942
to
3a9b0b9
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.
Forgot to publish my incomplete review before we starting talking in slack.
ec90969
to
fb9f7b5
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.
Overall this looks good, nice work @tylerslaton
pkg/controller/operators/openshift/clusteroperator_controller_test.go
Outdated
Show resolved
Hide resolved
pkg/controller/operators/openshift/clusteroperator_controller_test.go
Outdated
Show resolved
Hide resolved
pkg/controller/operators/openshift/clusteroperator_controller_test.go
Outdated
Show resolved
Hide resolved
2d47d1e
to
6599a95
Compare
f35669e
to
3c57ae7
Compare
Is it worth having an e2e test, somehow? Could we have a regression test that matches the bug and ensure this fixes it? |
I updated the E2E suite in this PR to test using the env var instead of testing the same logic with the CV. Do you think that would be enough here? |
I pulled down these changes and didn't see any more "clusterversion" usage, outside of e2e test utilities, so I think we're covered on that front now. |
3c57ae7
to
8804dba
Compare
@awgreene @perdasilva @timflannagan How is this looking to you all? I was wondering if we could try to get this through today but let me know if anything is blocking. |
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
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: exdx, grokspawn, timflannagan, tylerslaton 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 |
Get the current OpenShift release version from the RELEASE_VERSION environment variable since the behavior of the original source -- the ClusterVersion desired release status field -- has changed. Signed-off-by: Tyler Slaton <[email protected]> Co-authored-by: Nick Hale <[email protected]>
8804dba
to
ec9903d
Compare
/lgtm |
/unhold |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Description of the change:
Introducing some code that Nick wrote a fix for prior to him leaving Red Hat. Here are his comments:
Get the current OpenShift release version from the OPENSHIFT_RELEASE
environment variable since the behavior of the original source --
the ClusterVersion desired release status field -- has changed.
Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue