Merge lp://staging/~themue/juju-core/go-state-lifecycle-watcher into lp://staging/~juju/juju-core/trunk

Proposed by Frank Mueller
Status: Work in progress
Proposed branch: lp://staging/~themue/juju-core/go-state-lifecycle-watcher
Merge into: lp://staging/~juju/juju-core/trunk
Prerequisite: lp://staging/~themue/juju-core/go-state-lifecycle-relation
Diff against target: 295 lines (+145/-38)
5 files modified
state/export_test.go (+12/-0)
state/lifecycle.go (+10/-5)
state/lifecycle_test.go (+69/-32)
state/relation.go (+1/-1)
state/watcher.go (+53/-0)
To merge this branch: bzr merge lp://staging/~themue/juju-core/go-state-lifecycle-watcher
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+118972@code.staging.launchpad.net

Description of the change

state: added life watcher

The LifeWatcher allows to monitor changes of
the lifecycle state for any entity with a
lifecycle (Relation, Unit, Service, Machine).

https://codereview.appspot.com/6461066/

To post a comment you must log in.
Revision history for this message
William Reade (fwereade) wrote :

I didn't spot any checks that Dead->Dying was a valid (but ignored)
"transition", but maybe I just missed something. Otherwise LGTM (I
retain notable stress about us implementing this stuff racily... but
that's a larger decision that we've already taken outside the context of
this specific CL).

https://codereview.appspot.com/6461066/diff/1/state/watcher.go
File state/watcher.go (right):

https://codereview.appspot.com/6461066/diff/1/state/watcher.go#newcode153
state/watcher.go:153: // ignore other changes of config node.
This comment feels slightly redundant to me.

https://codereview.appspot.com/6461066/

359. By Frank Mueller

state: changes after reviews

360. By Frank Mueller

state: adopted lifecycle changes to watcher

361. By Frank Mueller

state: merged trunk to be up-to-date

Unmerged revisions

361. By Frank Mueller

state: merged trunk to be up-to-date

360. By Frank Mueller

state: adopted lifecycle changes to watcher

359. By Frank Mueller

state: changes after reviews

358. By Frank Mueller

state: added life watcher

357. By Frank Mueller

state: changed lifecycle after review, now uses RetryChange and is embedable

356. By Frank Mueller

state: merged trunk and worked off the review comments

355. By Frank Mueller

state: first lifecycle utils and implementation for relation

354. By Roger Peppe

state: implement MachineInfoWatcher

R=niemeyer
CC=
https://codereview.appspot.com/6447054

353. By William Reade

add RelationState type...

...and use it to reconcile HookQueue state with initial watcher event on
load.

As part of this, I added a RelationId to HookQueue, and return it in every
HookInfo, so that we can identify what relation the hook is actually meant
to run against.

R=niemeyer
CC=
https://codereview.appspot.com/6441047

352. By Roger Peppe

environs/ec2: start agents via agent-specific symbolic links

R=niemeyer
CC=
https://codereview.appspot.com/6454057

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches