Currently, there is no path inside the appfwk to get an app
from 'remove-failed' state to any other state.
This commit makes it so that using remove --force
will prevent the app from being put in remove-failed
if the operation fails.
Instead, the app is put in 'uploaded' state
and a progress message warning about this is set.
remove --force can also be used to recover the app
from remove-failed state for a posterior delete.
Test Plan:
PASS: remove (without -f) results in remove-failed
state in case of an error
PASS: remove --force results in uploaded state
instead of remove-failed in case of an error
and the progress message is set.
(tested for apply-failed and remove-failed)
PASS: remove --force does not set the warning
progress message when the remove succeeds
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/855516 /opendev. org/starlingx/ config/ commit/ 7f8a5fb2424dfe7 a4f1c3310c34d4c 4b24fde4ac
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7f8a5fb2424dfe7 a4f1c3310c34d4c 4b24fde4ac
Author: Leonardo Fagundes Luz Serrano <email address hidden>
Date: Thu Sep 1 10:13:15 2022 -0300
AppFwk: remove -f prevents remove-failed state
Currently, there is no path inside the appfwk to get an app
from 'remove-failed' state to any other state.
This commit makes it so that using remove --force
will prevent the app from being put in remove-failed
if the operation fails.
Instead, the app is put in 'uploaded' state
and a progress message warning about this is set.
remove --force can also be used to recover the app
from remove-failed state for a posterior delete.
Test Plan:
PASS: remove (without -f) results in remove-failed
state in case of an error
PASS: remove --force results in uploaded state
instead of remove-failed in case of an error
and the progress message is set.
(tested for apply-failed and remove-failed)
PASS: remove --force does not set the warning
progress message when the remove succeeds
Related-Bug: 1987115 28b0319e6c43814 1f9aa1c9240
Signed-off-by: Leonardo Fagundes Luz Serrano <email address hidden>
Change-Id: Iba659c05bf9abd