"state" is too ambiguous/overloaded, should use flag #76

Closed
marcoceppi opened this Issue Jun 29, 2016 · 5 comments

Comments

Projects
None yet
4 participants
Owner

marcoceppi commented Jun 29, 2016

state, for those new to juju is confusing as it gives the impression you're impacting the Juju state when it's actually the unit state and a state that's rather shallow at the end of the day. It's also very similar to status which brings more confusion.

The suggestion was to use the word "flag" instead which doesn't have as much meaning across domains as state and can be used to better represent (and ties in nicely to @when/@when_not).

The changes would be

set_state -> set_flag
remove_state -> remove_flag

@marcoceppi marcoceppi added this to the 2.0 milestone Jun 29, 2016

Owner

johnsca commented Jun 29, 2016

In particular, it seems that people find set_state and status_set confusing, which is understandable, especially if they're both imported as bare identifiers.

Owner

marcoceppi commented Jun 29, 2016

updates original description

Contributor

chuckbutler commented Jun 29, 2016

@johnsca when you say bare identifiers, are you referring to the following?

from charms.reactive import set_state
from charmhelpers.core.hookenv import status_set

# The above make bare identifiers
Owner

marcoceppi commented Jun 29, 2016

Yes

On Wed, Jun 29, 2016, 4:09 PM Charles Butler notifications@github.com
wrote:

@johnsca https://github.com/johnsca when you say bare identifiers, are
you referring to the following?

from charms.reactive import set_statefrom charmhelpers.core.hookenv import status_set

The above make bare identifiers


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#76 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAET1T-qhXbE2cbD5RU9i1_fOUkMDEWvks5qQnyngaJpZM4JBB3M
.

@johnsca johnsca referenced this issue in juju-solutions/charms.unit Jul 11, 2016

Merged

Added unit test harness. #1

@galgalesh galgalesh closed this Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment