+ # If they do run redundant hooks, nothing *bad* should happen, but
+ # it's a potentially significant waste of time.
I'm not entirely comfortable calling these redundant hooks, their
effectively state changes events trigger hook executions against a
dead relation. The fact that its safe is an implementation detail that
may change in the future.
The previous comment posited an example that made this more clear. firing a modified after a broken relation is detected, is a problem imo.
LGTM +1, some minors from a second pass.
[8]
- self.client, unit_relation, lifecycle, self.makeDir())
+ self.client, unit_relation, unit.unit_name, lifecycle,
+ self.makeDir())
+ return RelationWorkflo wState(
+ self._client, unit_relation, relation_name, lifecycle,
+ self._state_dir)
One of these is wrong.
[9]
+ # If they do run redundant hooks, nothing *bad* should happen, but
+ # it's a potentially significant waste of time.
I'm not entirely comfortable calling these redundant hooks, their
effectively state changes events trigger hook executions against a
dead relation. The fact that its safe is an implementation detail that
may change in the future.
The previous comment posited an example that made this more clear. firing a modified after a broken relation is detected, is a problem imo.