-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
Current state
Currently the task is run only during y-upgrades. On z-upgrades (updates) the task does not run, since it is too expensive.
Desired state
There should be no problem running the upgrade task even on small z-upgrades.
Design notes
In the current implementation we already register in the DB the tasks that are registered for run with a couple of metadata properties (https://github.com/Katello/katello/blob/942b2ccff2af9cbf43a14e43afda8f8789cee5b0/db/seeds.d/111-upgrade_tasks.rb#L3).
I suggest adding a dynamic check when the task should run. The method will receive the version when the task was last executed and the new version that is currently installed and it will return true if the task need to run in this migration and false otherwise. This way the control on task run frequency will be passed to the task itself.