-
Notifications
You must be signed in to change notification settings - Fork 9
RFC upgrader: (un)skip specific upgrade #27
Description
@jirikuncar commented on Fri Aug 22 2014
Problem
One would like to skip a specific upgrade and later maybe re-run it.
Proposal
-
inveniomanage upgrader skip NAME- addNAMEupgrade to database -
inveniomanage upgrader unskip NAME- removeNAMEupgrade to database
Question
Do we need to distinguish between skipped and applied upgrades or we keep it on administrator? We could add a column skipped to upgrade table or allow applied to be NULLable.
@tiborsimko commented on Fri Aug 22 2014
I'd vote for adding a new column to capture status, just to be on the safe side. Otherwise we risk that at some later point in time, an admin would like to know "which upgrade recipes did I skip and when?" that inveniomanage would not be able to answer.
E.g. we could split the current applied column to two columns, like status (e.g. new, applied, skipped) and when (e.g. 2014-08-22 15:09:07).
@lnielsen commented on Fri Aug 22 2014
like status (e.g. new, applied, skipped) and when (e.g. 2014-08-22 15:09:07).
+1 butstatusshould likely just be boolean (applied/skipped), since new is defined by the algorithm.
One problem you have to take into consideration is that if an upgrade is marked as applied (e.g. skipped), it's assumed that all its dependencies in the DAG has also been applied. E.g. assume upgrade finds that these upgrades have not been applied:
1 -> 2 -> 3
If you run inveniomanage upgrader skip 2, then upgrader assumes that 1 has also been applied, so it will only run 3 instead of 1 and 3.
Thus we might either add inveniomanage upgrader run --stop-at=1, or use inveniomanage upgrader run --skip=1 instead and not care about the unskip.
@jirikuncar commented on Fri Aug 22 2014
if an upgrade is marked as applied
The upgrader would look at skipped upgrade recipe as not-applied but allow other upgrades depending on it to run.
inveniomanage upgrader run --(stop|break)-at=1 should be enough too WDYT @jalavik?
@jalavik commented on Mon Aug 25 2014
+1 for two column split of applied.
@jirikuncar And yeah, that should work.