action #69997

Updated by mkittler about 1 year ago

### status quo
* The "restart" route is used when one restarts a job via the web UI and therefore also the route I suggest to use when using the REST-API directly.
* The "duplicate" route also exists but is at this point ironically almost a duplicate of the "restart" route.
* We don't know whether the "duplicate" route is still used. (The even it generates is not registered as audit event.)

### acceptance criteria
* AC0: Make the "duplicate" route an alias for the "restart" route using the same code internally.
* AC1: Backwards compatibility of any route must not be broken. (Except for the event currently emitted by the "duplicate" route. It is not used and may be dropped/replaced. The parameter `dup_type_auto` can likely be ignored as well because it doesn't seem so have any effect anymore.) dropped/replaced.)

### historical remarks
According to the commits 1c7de4b2ce and 6b48bd8a72 "restart" was there before. According to `git show 6b48bd8a72:lib/OpenQA/modules/` "restart" meant at the time aborting the job and setting it back to scheduled. Only "duplicate" would create a new job. That explains why "duplicate" was added in the first place.

### notes
* The specific functions I'm talking about are `OpenQA::WebAPI::Controller::API::V1::Job::restart` and `OpenQA::WebAPI::Controller::API::V1::Job::duplicate`.
* The worker uses the "duplicate" route when a job has been aborted because the worker service is stopped.