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

Incorrect version check in run_latest_build.sh #912

Closed
beekhof opened this issue Apr 30, 2018 · 5 comments
Closed

Incorrect version check in run_latest_build.sh #912

beekhof opened this issue Apr 30, 2018 · 5 comments

Comments

@beekhof
Copy link

beekhof commented Apr 30, 2018

Bug:

What happened:

./run_latest_build.sh

++ oc version
++ head -1

  • version='oc v3.7.23'
    ++ echo oc v3.7.23
    ++ egrep -o 'v[0-9]+(.[0-9]+)+'
    ++ tr -d v.
  • client_version=3723
  • '[' latest '!=' latest ']'
  • (( 3723 >= 3100 ))
  • oc cluster up --image=docker.io/openshift/origin --tag=latest --enable=service-catalog,template-service-broker,router,registry,web-console --routing-suffix=172.16.1.70.nip.io --public-hostname=172.16.1.70.nip.io
    Error: unknown flag: --tag

[...]

  • '[' 1 -ne 0 ']'
  • echo 'Error starting cluster'
    Error starting cluster
  • exit

What you expected to happen:

Script uses the correct flags

How to reproduce it:

Run ./run_latest_build.sh with oc v3.7.23

@jmrodri
Copy link
Contributor

jmrodri commented Apr 30, 2018

@beekhof thanks we'll look at this one soon. For now, you could update the version check to be 3723 to let you run with the 3.7.23 until we have a patch for this script.

@jmrodri
Copy link
Contributor

jmrodri commented Apr 30, 2018

Here is how Spacewalk project did version comparisons using the librpm algorithm:
https://github.com/spacewalkproject/spacewalk/blob/master/java/code/src/com/redhat/rhn/common/util/RpmVersionComparator.java#L35-L116

@jmrodri
Copy link
Contributor

jmrodri commented Apr 30, 2018

@jmrodri
Copy link
Contributor

jmrodri commented Apr 30, 2018

I think in order to make this fool proof we're going to have to parse the string field by field. Otherwise, we're always going to run into a problem.

@jmrodri jmrodri added the bug label Apr 30, 2018
@djzager
Copy link
Member

djzager commented Apr 30, 2018

I believe the best resolution to this is for us to simply remove the oc cluster up from the run_latest_build.

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

No branches or pull requests

3 participants