Closed dabercro closed 5 years ago
@vargasa Here's an example for getting the list of sites to run over: https://github.com/CMSCompOps/WorkflowWebTools/blob/master/workflowwebtools/workflowinfo.py#L325
I worked on an endpoint to get the recovery_info by using WorkflowInfo
from cmstoolbox
, for instance:
But, there seems to be a check already in place:
I'll keep looking into this :construction:
The check that is in place is not regarding the sites that can be used for each workflow/task but instead the sites that has been selected by the user. The properties of the "action" are modified incrementally as the user triggers events that modify the state of the application. So when a checkbox is clicked the site is then added to an array in the action object which is kept into the state's application.
There is also an idx
:
which remains undefined and a warning is triggered each time a checkbox is clicked in a manual action form. It may be possible this refers to action.idx
but I can't confirm so far. It can be even possible that it refers to taskId as action.idx
and idx
are compared in onActionDataChange
.
For the old tool each action has its own form:
And an "action form" is needed for each task. Here there is just one single form for all the selected actions
To clarify, the old tool only has a site form for each task when "Manual" is selected, not "Ban". Though it's probably easiest to do that in all cases in the new tool first.
Sorry I didn't get to this earlier. It's been a busy day. Do you have other questions about the site selection? I see you found a link on your own already.
Yes. Does the full list of sites need to be rendered for each action form or is it enough with sites_to_run
per task?
I usually render the whole list, but @sharad1126 can tell us if that is useful or not. I think it's most common to just deselect certain sites.
The whole list needs to be rendered as there are times when even the selected sites are in drain and then we have to change sites or cases when we don't want to send to specific sites due to a future downtime or other reasons. The one how it works now is actually good. But I would like to discuss something at the next meeting which could be helpful too.
Clarifying the suggestions - Removing sites from ACDC action page where we can't run tasks at (blacklisted sites) for particular tasks/requests.
As I understand would be:
If anyone can provide input about where to find this information for each task (API if available) would be helpful
The site status can be fetched using the cmstoolbox
module.
For an individual site's status, you could use this: https://github.com/CMSCompOps/OpsSpace/blob/master/cmstoolbox/sitereadiness.py#L63
The old console uses this to build a JSON response: https://github.com/CMSCompOps/OpsSpace/blob/master/cmstoolbox/sitereadiness.py#L15
The backend of this is the site dashboard (https://github.com/CMSCompOps/OpsSpace/blob/master/cmstoolbox/dashboard.py#L119). If we identify a better source, we should update it there.
Thanks @dabercro, for some sites no information is provided (NOINFO in the screenshot). We can also change the CSS style of the checkbox instead of printing the status but the functionality would be the same. @sharad1126 What do you think?
@vargasa looks good to me. I can use the console with you guys this Thursday and we can see how it is working!
I'll close this as the main issue was addressed on https://github.com/CMSCompOps/wtc-console/pull/12
For the old tool, when selecting sites to run on manually, the sites given by the acdcserver were automatically selected. This gives the operator more information and less looking at other pages to do. This should be added to this tool.