You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For every known related unit (those which have joined and not yet departed), run the relation-departed hook.
Run the relation-broken hook.
depart from its scope in the relation.
So what's the difference between relation-departed and relation-broken? Think of relation-departed as the "saying goodbye" event. While in the latter state, relation settings can still be read (with relation-get) and a relation can even still be set (with relation-set). Once relation-broken fires, however, the relation no longer exists.
I think there is a logical mistake + unclear behavior description.
"the latter" should be "the former" because relation-departed runs first. In other words:
departed == can still read and write to relation data
But if I can still do relation_set in -relation-departed how will the other side react to that to read this new relation data? Will it receive another -relation-changed event or not? It is not clear at all.
What are the ordering guarantees for -departed in this case?
To make use of relation_set in -departed more information is needed. If there are two applications A and B in would be useful to know what happens after juju remove-relation A B:
Do all units in A get a chance to run relation-departed before all units in B? Or there is no order to that?
Can relation-set be used on all A and B units? How will they receive relation data updates before -relation-broken?
Is there a guarantee that no -broken event will be triggered while there are still -departed events to be processed on individual units of A or B?
It would make sense to me if something like that was described:
Any A or B unit can do relation_set in -relation-departed
OR relation_set cannot be used in -relation-departed;
Any A or B unit can do relation_get in -relation-broken to retrieve settings set in -relation-departed
OR relation_get and relation_set cannot be used in -relation-broken
OR there is no way to do a relation_set after -relation-departed
I think it is a valid use-case to send some data over a relation after an operator runs remove-relation because there may be some information needed on A or B units from the other side for proper cleanup besides the information already present on a given relation when -relation-departed fires.
The text was updated successfully, but these errors were encountered:
https://jujucharms.com/docs/2.3/authors-relations-in-depth#departing-relations
I think there is a logical mistake + unclear behavior description.
"the latter" should be "the former" because relation-departed runs first. In other words:
departed == can still read and write to relation data
But if I can still do relation_set in -relation-departed how will the other side react to that to read this new relation data? Will it receive another -relation-changed event or not? It is not clear at all.
What are the ordering guarantees for -departed in this case?
To make use of relation_set in -departed more information is needed. If there are two applications A and B in would be useful to know what happens after
juju remove-relation A B
:It would make sense to me if something like that was described:
OR relation_set cannot be used in -relation-departed;
OR relation_get and relation_set cannot be used in -relation-broken
OR there is no way to do a relation_set after -relation-departed
I think it is a valid use-case to send some data over a relation after an operator runs remove-relation because there may be some information needed on A or B units from the other side for proper cleanup besides the information already present on a given relation when -relation-departed fires.
The text was updated successfully, but these errors were encountered: