MGMT-12471: Don't wait for console if it is disabled - #574
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #574 +/- ##
==========================================
- Coverage 52.11% 52.10% -0.01%
==========================================
Files 14 14
Lines 2715 2727 +12
==========================================
+ Hits 1415 1421 +6
- Misses 1171 1175 +4
- Partials 129 131 +2
|
omertuc
left a comment
There was a problem hiding this comment.
Looks perfect, just one small remark
| // zero means -> bring all logs | ||
| controllerLogsSecondsAgo = 0 | ||
| consoleOperatorName = "console" | ||
| consoleCapabilityName = "Console" |
There was a problem hiding this comment.
Can we:
- Stop our weird
go.modreplacedirective for openshift/api and bring it as a proper dependency? - Use the actual constant for this
Let's not hold back this PR though and follow up with a separate PR
There was a problem hiding this comment.
Unfortunately updating dependencies is painful, as usual. The "replace" for this one in particular can't be removed because there still exists a "v3.9.0" version in proxy.golang.org:
$ curl https://proxy.golang.org/github.com/openshift/api/@v/list
v3.9.0+incompatible
The tag from the source repository was removed, but the entry in the Go module proxy is still there. This means that Go will always prefer that version, as there are no other version tags. So unless the OpenShift team retracts that version we can't remove the "replace".
I could update that replace directive to one that contains the "Console" constant, but unfortunately it seems it is only available in the "release-4.12" branch, and that requires Go 1.19:
$ go mod edit -replace github.com/openshift/api=github.com/openshift/api@release-4.12
$ go mod tidy
$ go mod vendor
$ go build -o build/installer src/main/main.go
# k8s.io/apimachinery/pkg/conversion/queryparams
vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go:58:17: undefined: reflect.Pointer
vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go:142:7: undefined: reflect.Pointer
note: module requires Go 1.19
I can get into that rabbit hole, but it is deeper than it looks.
There was a problem hiding this comment.
This would be the first step, I think, just updating to Go 1.19: #575.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhernand, omertuc The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| clusterOperatorHandler := NewClusterOperatorHandler(c.kc, consoleOperatorName) | ||
| clusterVersionHandler := NewClusterVersionHandler(c.log, c.kc, timer) | ||
| disabledCapabilities, err := clusterVersionHandler.GetDisabledCapabilities() |
618045c to
9dc8264
Compare
This patch changes the controller so that it doesn't wait for the console operator when the console capability is explicitly disabled. Related: https://issues.redhat.com/browse/MGMT-12471 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
9dc8264 to
6fcf60c
Compare
|
/lgtm |
|
@jhernand: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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/test-infra repository. I understand the commands that are listed here. |
This is a backport of MGMT-12471 for ACM 2.6. It contains the changes in pull requests openshift#574 and openshift#589. This patch changes the controller so that it doesn't wait for the console operator when the console capability is explicitly disabled. Related: https://issues.redhat.com/browse/MGMT-13657 Related: https://issues.redhat.com/browse/MGMT-12471 Related: openshift#574 Related: openshift#589 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
This is a backport of MGMT-12471 for ACM 2.6. It contains the changes in pull requests openshift#574 and openshift#589. This patch changes the controller so that it doesn't wait for the console operator when the console capability is explicitly disabled. Related: https://issues.redhat.com/browse/MGMT-13657 Related: https://issues.redhat.com/browse/MGMT-12471 Related: openshift#574 Related: openshift#589 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
This is a backport of MGMT-12471 for ACM 2.7. It includes the changes in pull request openshift#589. The changes in pull request openshift#574 are alse necessary, but they are included in the ACM 2.7 branch already. Currently the operator handler checks if the operator is available in the service, but it doesn't take into account that the operator may have been removed from the list of managed operators. That results in a nil pointer exception and a crash of the controller. This patch fixes that adding a nil check to the relevant code. Related: https://issues.redhat.com/browse/MGMT-13664 Related: https://issues.redhat.com/browse/MGMT-12471 Related: openshift#589 Related: openshift#574 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
This is a backport of MGMT-12471 for ACM 2.6. It contains the changes in pull requests #574 and #589. This patch changes the controller so that it doesn't wait for the console operator when the console capability is explicitly disabled. Related: https://issues.redhat.com/browse/MGMT-13657 Related: https://issues.redhat.com/browse/MGMT-12471 Related: #574 Related: #589 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
This is a backport of MGMT-12471 for ACM 2.7. It includes the changes in pull request #589. The changes in pull request #574 are alse necessary, but they are included in the ACM 2.7 branch already. Currently the operator handler checks if the operator is available in the service, but it doesn't take into account that the operator may have been removed from the list of managed operators. That results in a nil pointer exception and a crash of the controller. This patch fixes that adding a nil check to the relevant code. Related: https://issues.redhat.com/browse/MGMT-13664 Related: https://issues.redhat.com/browse/MGMT-12471 Related: #589 Related: #574 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
This patch changes the controller so that it doesn't wait for the console operator when the console capability is explicitly disabled.
Related: https://issues.redhat.com/browse/MGMT-12471