Skip to content
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

Compare real operator name, not prefix when checking for installed versions #1337

Merged
merged 2 commits into from
Feb 12, 2020

Conversation

ANeumann82
Copy link
Member

Add unit tests to verify that.
Add message if operator version install does not install new version

Signed-off-by: Andreas Neumann aneumann@mesosphere.com

Fixes #615

…rsions

Add unit tests to verify that.
Add message if operator version install does not install new version

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@@ -216,10 +215,10 @@ func (c *Client) OperatorVersionsInstalled(operatorName, namespace string) ([]st
if err != nil {
return nil, err
}
existingVersions := []string{}
existingVersions := make([]string, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I believe that syntax on the left is preferable unless you define a custom size.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IntelliJ complained about it, referring to https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

I changed it back for now

Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm with one nit 🚢

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@ANeumann82 ANeumann82 merged commit da8b654 into master Feb 12, 2020
@ANeumann82 ANeumann82 deleted the an/fix-installed-operator-version-list branch February 12, 2020 08:58
ANeumann82 added a commit that referenced this pull request Feb 13, 2020
…rsions (#1337)

* Compare real operator name, not prefix when checking for installed versions
* Unit tests to verify that.
* Add message if operator version install does not install new version

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
runyontr pushed a commit that referenced this pull request Mar 11, 2020
…rsions (#1337)

* Compare real operator name, not prefix when checking for installed versions
* Unit tests to verify that.
* Add message if operator version install does not install new version

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install of Operators won't work when similar OperatorVersions with same Prefix pre-exist
2 participants