StorminStanley / st2workroom

Vagrant environment used to play with StackStorm, develop StackStorm for your environment, or develop on StackStorm itself!
Apache License 2.0
23 stars 21 forks source link

"-r" option is broken / doesn't work #321

Closed Kami closed 8 years ago

Kami commented 8 years ago

As mentioned on Slack, "-r" option is broken. In fact, it looks like "-r" ever worked correctly (either that or these was a regression at some point, but unlikely).

"-r" flag simply makes it checkout out the provided SHA, but it doesn't actually make it use it. To actually use it, ENV would need to be set to current_working_directory (this way it will use correctly checked out version) orENV=<branch / revision name>`.

This is the same if you manually checked out SHA in /opt/puppet this won't do anything if you don't actually set ENV=current_working_directory, I believe we had instructions on that and everyone was aware of it.

DEBUG=1 bash install.sh -r fix-pip

Doesn't work aka it won't use the provided revision (it will just check it out which again != using it).

ENV=current_working_directory DEBUG=1 bash install.sh -r fix-pip

Works fine - branch is checked out and also used, because ENV is set.

Reproducing the issue is easy - simply create a new branch with some obvious change and run the script with the -r flag - you will see the branch is checked out, but not used (the change you made in a branch won't be used and the used environment will be production and not the branch name).

Kami commented 8 years ago

@lakshmi-kannan I said the same thing last time, but you said is fine.

Now i'm sure it doesn't work because I tested it like 5 times and I had a look at the output to see which branch and code is actually used.

Kami commented 8 years ago

In short, one of the easiest solutions is for this script to simply set ENV=current_working_directory if -r is provided.