|
Ran
|
Jobs
1
|
Files
132
|
Run time
16s
|
Badge
README BADGES
|
push
gitlab-ci
fix: Swap order of daemon state machines. This came about because the main state machine inspects the `ctx.deployment.rollback_failed` variable, which is set in the `deployment_tracking` state machine. We always want the setting to happen first, and in one corner case this did not happen if there were no intervening states between the inspection and the previous state. Illustrating with an example. In most cases it would work because: ``` main_state.OLD_STATE deployment_tracking.OLD_STATE | v main_state.INTERMEDIARY_STATE deployment_tracking.NEW_STATE.<set rollback_failed flag> | v main_state.NEW_STATE.<inspect rollback_failed flag> ``` But in the simplest of transitions, it would break, like this: ``` main_state.OLD_STATE deployment_tracking.OLD_STATE | v main_state.NEW_STATE.<inspect rollback_failed flag> deployment_tracking.NEW_STATE.<set rollback_failed flag> ``` where one can see the flag is set too late. `ArtifactFailure_Leave` is one place where it happens. By reversing the order of the state machines, this does not happen anymore, and this should always be the correct action, since the `deployment_tracking` never checks any external variables. Changelog: Artifact name is now properly marked as "INCONSISTENT" if there is an error in the `ArtifactFailure_Leave` script during an installation. Ticket: None Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech> (cherry picked from commit 20f85f05d)
1 of 1 new or added line in 1 file covered. (100.0%)
283 existing lines in 13 files now uncovered.7076 of 8867 relevant lines covered (79.8%)
12331.03 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 1165860265.1 | 0 |
79.8 |