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
While trying to figure out whether this test could have caught #3260 I noticed that, while it passes, it never executes any node in the instance create saga past N005 (the "create instance record" step). That is, the injected failures in any nodes past the "create instance record" node are never reached, because that node always fails first. This doesn't cause the test to fail because it only checks that the saga failed and not that it failed at the point where the failure was actually injected.
This is happening because the instance create saga creates a new instance ID when the saga DAG is created (and not as part of saga execution itself):
The same DAG gets reused for every loop through the test, so the instance ID doesn't change between iterations. After the "create record" node fails for the first time, the instance is in the Destroyed state, and all subsequent attempts to recreate it fail. (Outside the test, attempting to recreate an instance with the same name as a failed instance will create a new saga with a new instance ID, avoiding the conflict.)
The text was updated successfully, but these errors were encountered:
Code:
omicron/nexus/src/app/sagas/instance_create.rs
Lines 1647 to 1691 in 241c673
While trying to figure out whether this test could have caught #3260 I noticed that, while it passes, it never executes any node in the instance create saga past N005 (the "create instance record" step). That is, the injected failures in any nodes past the "create instance record" node are never reached, because that node always fails first. This doesn't cause the test to fail because it only checks that the saga failed and not that it failed at the point where the failure was actually injected.
This is happening because the instance create saga creates a new instance ID when the saga DAG is created (and not as part of saga execution itself):
omicron/nexus/src/app/sagas/instance_create.rs
Lines 144 to 155 in 241c673
The same DAG gets reused for every loop through the test, so the instance ID doesn't change between iterations. After the "create record" node fails for the first time, the instance is in the Destroyed state, and all subsequent attempts to recreate it fail. (Outside the test, attempting to recreate an instance with the same name as a failed instance will create a new saga with a new instance ID, avoiding the conflict.)
The text was updated successfully, but these errors were encountered: