Skip to content

MGMT-13664: Don't crash if operator isn't monitored by service - ACM 2.7 - #635

Merged
openshift-merge-robot merged 1 commit into
openshift:release-ocm-2.7from
jhernand:dont_wait_for_console_if_capability_is_disabled_acm_2_7_backport
Feb 14, 2023
Merged

MGMT-13664: Don't crash if operator isn't monitored by service - ACM 2.7#635
openshift-merge-robot merged 1 commit into
openshift:release-ocm-2.7from
jhernand:dont_wait_for_console_if_capability_is_disabled_acm_2_7_backport

Conversation

@jhernand

@jhernand jhernand commented Feb 14, 2023

Copy link
Copy Markdown
Contributor

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

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>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 14, 2023
@openshift-ci-robot

openshift-ci-robot commented Feb 14, 2023

Copy link
Copy Markdown

@jhernand: This pull request references MGMT-13664 which is a valid jira issue.

Details

In response to this:

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

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/test-infra repository.

1 similar comment
@openshift-ci-robot

openshift-ci-robot commented Feb 14, 2023

Copy link
Copy Markdown

@jhernand: This pull request references MGMT-13664 which is a valid jira issue.

Details

In response to this:

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

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/test-infra repository.

@openshift-ci openshift-ci Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 14, 2023
@openshift-ci
openshift-ci Bot requested review from gamli75 and osherdp February 14, 2023 11:26
@jhernand jhernand changed the title MGMT-13664: Don't crash if operator isn't monitored by service MGMT-13664: Don't crash if operator isn't monitored by service - ACM 2.7 Feb 14, 2023
@codecov

codecov Bot commented Feb 14, 2023

Copy link
Copy Markdown

Codecov Report

Merging #635 (10f2054) into release-ocm-2.7 (8248f06) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release-ocm-2.7     #635   +/-   ##
================================================
  Coverage            52.18%   52.18%           
================================================
  Files                   14       14           
  Lines                 2727     2727           
================================================
  Hits                  1423     1423           
  Misses                1174     1174           
  Partials               130      130           
Impacted Files Coverage Δ
.../assisted_installer_controller/operator_handler.go 79.02% <100.00%> (ø)

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2023
@openshift-ci

openshift-ci Bot commented Feb 14, 2023

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: filanov, jhernand

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2023
@openshift-ci

openshift-ci Bot commented Feb 14, 2023

Copy link
Copy Markdown

@jhernand: all tests passed!

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
openshift-merge-robot merged commit 3f25557 into openshift:release-ocm-2.7 Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants