Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Conversation

pmacik
Copy link
Contributor

@pmacik pmacik commented Nov 1, 2021

Motivation

Currently, there is a mechanism in install.sh script that detects existing operator subscriptions in cluster to avoid duplicities while installing SBO.

The detection mechanism misses operator package name (.spec.name) and so can have a false positive results when any other operator is installed from the same catalog source. If that happens, the subscription for SBO (and so SBO itself) is not installed and the following part of the script waiting for SBO to be installed fails.

Changes

This PR:

  • Adds check for .spec.name in existing subscription detection mechanism.

Testing

  1. Have a catalog source where SBO is available along with other operators (e.g. quay.io/operatorhubio/catalog:latest)
  2. Install any other operator from the catalog source with the same channel name (e.g. https://operatorhub.io/operator/cert-manager via stable channel) first
  3. Run install.sh with appropriate env variables to install SBO from the above catalog source with the same channel
OPERATOR_INDEX_IMAGE=quay.io/operatorhubio/catalog:latest \
OPERATOR_CHANNEL=stable \
OPERATOR_PACKAGE=service-binding-operator \
SKIP_REGISTRY_LOGIN=true \
./install.sh
  1. SBO should be installed

@openshift-ci openshift-ci bot requested review from isutton and sadlerap November 1, 2021 12:34
@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #1066 (f49d518) into master (b1a3650) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1066   +/-   ##
=======================================
  Coverage   58.87%   58.87%           
=======================================
  Files          30       30           
  Lines        1668     1668           
=======================================
  Hits          982      982           
  Misses        560      560           
  Partials      126      126           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1a3650...f49d518. Read the comment docs.

@sadlerap
Copy link
Contributor

sadlerap commented Nov 1, 2021

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 1, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadlerap

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 1, 2021
@openshift-merge-robot openshift-merge-robot merged commit 3a7e9ee into redhat-developer:master Nov 1, 2021
@pmacik pmacik deleted the fix-install-sub branch May 11, 2022 10:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants