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.
Updated by Quirin Pamp 4 months ago
I expect this bug was never an issue, because no one has used the combination of options where it occurs.
Updated by The Foreman Bot 4 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10693 added
Updated by Quirin Pamp 4 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|a7819004934b21c5e9574ac1b81217b740630871.