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

Externailize dependency on operator-sdk so it's not hardcoded in 4 scripts #18419

Closed
nickboldt opened this issue Nov 19, 2020 · 0 comments
Closed
Assignees
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template.
Milestone

Comments

@nickboldt
Copy link
Contributor

nickboldt commented Nov 19, 2020

Is your enhancement related to a problem? Please describe.

Mykhailo installed operator-sdk 0.17.2, because in https://github.com/eclipse/che-operator/blob/master/olm/update-nightly-bundle.sh#L34 it says that 0.17.x is required and 0.17.2 is the latest.

Then the build failed...

Error:  operator-sdk v0.17.1 is required. Aborting.
Error: Process completed with exit code 1.

-- https://github.com/eclipse/che-operator/runs/1426532323?check_suite_focus=true

... even though it includes 0.17.2:

https://github.com/eclipse/che-operator/blob/master/.github/workflows/release.yml#L57

... because OTHER scripts explicitly hardcodedly depend on 0.17.1.

** [1] ./go.mod ** 
15:	k8s.io/apimachinery v0.17.1

** [2] ./make-release.sh ** 
48:  [[ $(operator-sdk version) =~ .*v0.17.1.* ]] || { echo "[ERROR] operator-sdk v0.17.1 is required. Aborting."; exit 1; }

** [3] ./olm/docker-run.sh ** 
20:OPERATOR_SDK_VERSION=v0.17.1

** [4] ./olm/update-crd-files.sh ** 
34:  [[ $operatorVersion =~ .*v0.17.1.* ]] || { echo "operator-sdk v0.17.1 is required"; exit 1; }

** [5] ./vendor/modules.txt ** 
199:# k8s.io/apimachinery v0.17.1 => k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8

and

** [6] ./olm/update-nightly-bundle.sh ** 
34:    echo "This script requires Operator SDK v0.17.x. Please install the correct version to continue"

Describe the solution you'd like

Move the variable OPERATOR_SDK_VERSION=v0.17.1 into a text file called VERSION or REQUIREMENTS or something.
Load that file when running the shell scrupt, and validate installed operator-sdk version using that version so it's consistent across all scripts.

Describe alternatives you've considered

Keep it hardcoded in 3 scripts and 2 go config files, and occasionally break the build if not all files are updated consistently.

Additional context

@nickboldt nickboldt added the kind/enhancement A feature request - must adhere to the feature request template. label Nov 19, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 19, 2020
@nickboldt nickboldt added area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator team/deploy labels Nov 19, 2020
@nickboldt nickboldt mentioned this issue Nov 19, 2020
14 tasks
@tolusha tolusha mentioned this issue Nov 20, 2020
58 tasks
@tolusha tolusha closed this as completed Nov 20, 2020
@tolusha tolusha added this to the 7.22 milestone Nov 20, 2020
@tolusha tolusha removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. team/deploy labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

3 participants