Code review comment for lp:~hazmat/pyjuju/resolved-state-api

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Looks good, +1. Just two follow ups on your questioning above:

> > [1]
> >
> > +class ServiceUnitRelationResolvedAlreadyEnabled(StateError):
> > + """The unit has already been marked resolved.
> >
> > Documentation needs updating.
>
> how so?

s/unit/relation/

> > [6]
> >
> > + def set_relation_resolved(self, relation_map):
> > + """Mark a unit's relations as in need of being resolved.
> >
> > Doesn't this actually mean something like:
> >
> > "Mark the problem in the unit's relation as being resolved."
> >
> > IOW, it's not requesting for the problem to be resolved, but stating
> > that it has been.
> >
>
> It is actually making a request for the problem to be solved, not solving the
> problem directly, as there are behavioral aspects to transitions that need be
> done inside of the unit agent.

By the time someone calls "resolved", the *problem* which caused the hook to fail
must already have been fixed (hence the 'd' in "resolved"). We're not fixing the
problem with that action, we're simply stating that it's fine to go ahead because
someone else hopefully already fixed it.

review: Approve

« Back to merge proposal