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
Completely drop support for purge on delete. If feasible, drop it from iso7 only but if it requires a lot of refactoring, delay the change for a few months to keep the branches closer together.
Original ticket description
incorrect dependency inversion for purge-on-delete
When the server receives a version and purge on delete is enabled, it inverts requires-provides edges for deleted resources and adds them to the model with purged=True. Under some circumstances the inversion logic is incorrect, leading to a circular dependency.
The source that does the inversion is part of the _put_version method in the orchestration service.
The inversion logic is as follows: it first collects all requires for the previous version of each deleted resource, then it empties each deleted resource's requires and provides. It then iterates over each of these resources, and for each requires that is part of the current model, it inverts it by instead adding the dependency to provides (if it's a cross-agent dependency) and adds this one as requires for the other one.
This is where it can go wrong: suppose a requires b, where a and b live on different agents and only a is deleted from the model. Then this logic goes through the following steps
a. empty a's requires and provides
b. leave b's requires and provides as is because it is not being purged
c. invert: set b.requires = a and a.provides = b
=> b still has b.provides = a, resulting in a circular (and incorrect) dependency. A similar issue occurs if the dependency would have been the other way around.
This issue was first reported here (linked for a reference to the discussion)
The text was updated successfully, but these errors were encountered:
Description
Completely drop support for purge on delete. If feasible, drop it from iso7 only but if it requires a lot of refactoring, delay the change for a few months to keep the branches closer together.
Original ticket description
incorrect dependency inversion for purge-on-delete
When the server receives a version and purge on delete is enabled, it inverts requires-provides edges for deleted resources and adds them to the model with
purged=True
. Under some circumstances the inversion logic is incorrect, leading to a circular dependency.The source that does the inversion is part of the
_put_version
method in the orchestration service.The inversion logic is as follows: it first collects all
requires
for the previous version of each deleted resource, then it empties each deleted resource'srequires
andprovides
. It then iterates over each of these resources, and for eachrequires
that is part of the current model, it inverts it by instead adding the dependency toprovides
(if it's a cross-agent dependency) and adds this one asrequires
for the other one.This is where it can go wrong: suppose
a
requiresb
, wherea
andb
live on different agents and onlya
is deleted from the model. Then this logic goes through the following stepsa. empty
a
's requires and providesb. leave
b
's requires and provides as is because it is not being purgedc. invert: set
b.requires = a
anda.provides = b
=>
b
still hasb.provides = a
, resulting in a circular (and incorrect) dependency. A similar issue occurs if the dependency would have been the other way around.This issue was first reported here (linked for a reference to the discussion)
The text was updated successfully, but these errors were encountered: