Bug with @when_not

2015-12-16 Thread Cory Johns
The next release of the charms.reactive library (probably coming today)
will include a fix for the behavior of @when_not.

See https://github.com/juju-solutions/charms.reactive/pull/43 for more
information, but in short, @when_not was intended to behave as @when_none,
i.e. it should trigger if none of the states were active and *not* trigger
if any of the states were active.  Instead, it was incorrectly triggering
as long as any one of the states were not active.

This  was a subtle difference, and one I'm hopeful hasn't affected anyone,
but if you are depending on this behavior, it is recommended that you break
apart your handlers such that it is exact and explicit what the triggering
conditions are and what states will be active vs not active when the
handler is entered.

I also added the aliases @when_all and @when_none in case they are more
clear what the expected behavior is.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


charms.reactive 0.3.7

2015-12-16 Thread Cory Johns
Greetings.

I just cut release 0.3.7 of charms.reactive.  Unfortunately, due to
https://github.com/juju/charm-tools/issues/83 you will need to either
rebuild your charm from scratch from your source layer, or manually remove
the old version from the output charm's wheelhouse.

# Changes

beff693 [Cory Johns] Add release tagging to Makefile
efe48a9 [Cory Johns] Fixed bug in when_not logic and added perhaps less
confusing aliases when_all and when_none
ecff486 [Cory Johns] Doc string improvements for toggle_state suggested by
@mbruzek
3c7ce73 [Cory Johns] Added is_state and toggle_state helpers to Conversation
1a62a12 [Cory Johns] Prevent same conversation from being in the same state
multiple times
8e6b65a [Stuart Bishop] Docstrings
6f6c081 [Stuart Bishop] Allow filename arguments to be a callable, defering
their generation.
06ad7ac [Kevin W Monroe] drop which when sourcing charms.reactive.sh
1822408 [Kevin W Monroe] source charms.reactive.sh better
95362b3 [Cory Johns] Fix #36 - Improve docs based on feedback
b5131a0 [Stuart Bishop] Set JUJU_HOOK_NAME only when necessary
3ccb74e [Konstantinos Tsakalozos] Minor fixes on documentation typos
b351a34 [Stuart Bishop] Make set_remote docstring match the implementation
a7376c5 [Cory Johns] Added CLI docs
b61c219 [Cory Johns] Fixed charms.reactive.sh to work with set -u

# Highlights

This is mostly a bug-fix and doc improvement release, but it does add some
additional helpers.

# Usage

You should automatically get this update when you rebuild your charm layer
with `charm build`.  However, see the note above about the previous version.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


[ANN] charm-tools 1.11.0

2015-12-16 Thread Marco Ceppi
Hello everyone,

Following what has quickly become a 2 week release cadence as we prepare
for charm-tools 2.0, I'm happy to announce yet another release! Charm Tools
1.11.0 succeeds 1.10.0 and 1.10.1 as the latest release of charm-tools. If
you've managed to install 1.10.0 or 1.10.1 please be sure to upgrade. As
always you can verify the version you are running by executing: `charm
version`

# Changes

8b23dcd [Marco Ceppi] version bump
2dba307 [Marco Ceppi] Match source dependency as found in Xenial
e6890e0 [Cory Johns] Resolve #65: Add support for layer options in
layer.yaml
0b06f42 [Cory Johns] Refactor common code out of InterfaceBind and
StorageBind
892578f [Cory Johns] Revert unnecessary move of BuildError
15ea634 [Cory Johns] Removed superfluous HOOK_TEMPLATE_FILES and fix doc
copypasta error
8ce76ee [Cory Johns] Resolve #74: Use hook template from layers instead of
embedding in charm-tools

# Highlights

This fix includes a mix of new feature and bug fixes. Here are a few
highlights.

## Base layers determine hook templates

This is an advantage which paves the way for hook templates to be in
additional languages, such as powershell, and makes it easier to address
and plug future hooks into the build process

## Support for layer options in layer.yaml

This is a great new feature that helps steamline the charm build process.
Currently, several layers attempt to handle distribution data, they do this
by saying "fill out this yaml file" and the yaml file is usually named
after the layer, IE nginx.yaml, apache.yaml, django.yaml this makes it
harder for users to find options and provides no build time inspection.

With 1.11.0 layer authors can declare what their layer `defines` and an
`options` key in their layer.yaml. These "defines" are a jsonschema of the
"options" each layer accepts. Other layers can set values for these
"options" in their layer.yaml files. At build time, charm-tools will
validate that the options provided matches the defines schema to avoid
errors at deploy time. Furthermore the build process automatically
namespaces these options to avoid collisions between layers.

For more information about this feature, please see
https://github.com/juju/charm-tools/issues/65. I will follow up to this
post with an actual example of this implementation.

# Install

Charm Tools is available to users either via the juju/stable PPA, Homebrew,
or pip

## PPA

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install charm-tools

* There is a delay with precise version as some deps, mainly jsonschema,
are not available yet for this platform

## Homebrew

brew install charm-tools

* Will be available once https://github.com/Homebrew/homebrew/pull/47095 is
merged

## PIP

pip install -U charm-tools

Given our rapid release pace, we will be adding a new feature to
charm-tools which will provide a warning when charm-tools running locally
is out of date. This should help prompt swift upgrades as bugs are fixed
and new features land in our continued march to charm-tools 2.0!

Thanks,
Marco Ceppi
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju