Add Rename method to Job
Related tasks
Context
Job names must be unique with respect to other jobs in an action. This is necessary to be able to restore state after an interruption (i.e restart) as the Actions framework relies on the unique name to understand where to continue from.
This is an issue when using generic jobs in an action (e.g. Wait for pods), as there might be multiple moments in the action where that specific job should be run.
Currently, the only way to modify a Job
's name is to use the Extend
method, which is cumbersome as it requires considerable boilerplate for a simple name change.
Change
A Rename
method has been added to Job
that receives a string and returns a copy of the job with the name changed.