cms-PdmV / cmsPdmV

CERN CMS McM repository
4 stars 10 forks source link

Improve error message when force-completing a request with no output #1135

Closed lmoureaux closed 2 months ago

lmoureaux commented 3 months ago

Requests without output are always considered either 0% or 100% complete by ReqMgr, there is no middle ground. For non-admins, force-completing a request is only possible if it is more than 50% complete. So if the request has no output, it can only be force-completed by a non-admin if it is already complete.

What the non-admins should do is trigger the force-completion of a request in the same (computing) workflow that does keep its output. Force-completion acts at the workflow level, and Unified is smart enough to mark all requests in the workflow as complete (100% completion for those not keeping output).

To help confused users trying to force-complete requests without output, add an error message telling them why it doesn't work and what they could do about it (try some other request in the chain). Hopefully if the user is smart enough they understand which requests in the chain will work.

Use the opportunity to marginally improve the coding style and fix a typo.

See #1114.