Actions
Bug #38755
closedskip_failure option in foreman upgrade:run rake task does not work as designed
Description
We found this while making use of it here: https://github.com/Katello/katello/pull/11487#discussion_r2355640309
Reading this line here: https://github.com/theforeman/foreman/blob/develop/lib/tasks/upgrade.rake#L38
The intended design is clearly that `run_task` will return `false` if there is an error and `task.skip_failure?` is true. This will then prevent `task.mark_as_ran!` from being run in this case.
However, the false is not returned, instead we leave the if block and return true instead.
Can be tested in production using "foreman-rake upgrade:run" when a upgrade task with ":skip_failure => true, , :always_run => false" has been seeded, and the task has been manipulated to ensure it fails.
Actions