Re: Use case for: min-version

2015-08-12 Thread Stuart Bishop
On 12 August 2015 at 03:56, Tim Penhey wrote: > It would be trivial for the Juju version to be exported in the hook > context as environment variables. > > Perhaps something like this: > > JUJU_VERSION=1.24.4 > JUJU_VERSION_MAJOR=1 > JUJU_VERSION_MINOR=24 > JUJU_VERSION_PATCH=4 > # tag for 'alpha'

Re: Use case for: min-version

2015-08-12 Thread Stuart Bishop
On 12 August 2015 at 05:02, Jeff Pihach wrote: > Version checking for features can be dangerous because a commands output or > availability may change in the future and now your charm also needs a > "max-version", or "version-range" etc. A more robust solution could be > something along the lines

Re: Use case for: min-version

2015-08-11 Thread Jeff Pihach
Version checking for features can be dangerous because a commands output or availability may change in the future and now your charm also needs a "max-version", or "version-range" etc. A more robust solution could be something along the lines of a "feature-supported" query which would return whethe

Re: Use case for: min-version

2015-08-11 Thread Tim Penhey
It would be trivial for the Juju version to be exported in the hook context as environment variables. Perhaps something like this: JUJU_VERSION=1.24.4 JUJU_VERSION_MAJOR=1 JUJU_VERSION_MINOR=24 JUJU_VERSION_PATCH=4 # tag for 'alpha' 'beta' JUJU_VERSION_TAG= Thoughts? Tim On 12/08/15 07:48, Mar

Re: Use case for: min-version

2015-08-11 Thread Marco Ceppi
I'm not sure how I missed this bit of code, but I'm not a fan of it as it assumes paths in the deployed environment which have changed already in Juju's history and could potentially change again. Instead of globing around for juju binaries and parsing outputs of commands (which themselves may ver

Re: Use case for: min-version

2015-08-11 Thread Stuart Bishop
On 11 August 2015 at 03:32, Matt Bruzek wrote: > > We wrote a charm that needed election logic, so we used the new Juju feature > "is_leader". A user was interested in using a bundle that contained this > charm and it failed on them. It was hard to track down the cause of the > problem. It appe

Use case for: min-version

2015-08-10 Thread Matt Bruzek
We wrote a charm that needed election logic, so we used the new Juju feature "is_leader". A user was interested in using a bundle that contained this charm and it failed on them. It was hard to track down the cause of the problem. It appears they were using an earlier version of Juju that is ava