CMSCompOps / wtc-console

MIT License
1 stars 1 forks source link

Select Sites Ahead of Time #4

Closed dabercro closed 5 years ago

dabercro commented 5 years ago

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.

dabercro commented 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

vargasa commented 5 years ago

I worked on an endpoint to get the recovery_info by using WorkflowInfo from cmstoolbox, for instance:

http://wc-dev.cern.ch/api/v1/cmsweb/workflow/pdmvserv_task_EXO-RunIIFall17GS-01664__v1_T_181128_212158_5661/sites/

But, there seems to be a check already in place:

https://github.com/CMSCompOps/wtc-console/blob/c798e2d8201593c71bc4811c78458e4ca2f22c12/src/static/containers/Tasks/index.js#L300

I'll keep looking into this :construction:

vargasa commented 5 years ago

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:

https://github.com/CMSCompOps/wtc-console/blob/c798e2d8201593c71bc4811c78458e4ca2f22c12/src/static/containers/Tasks/index.js#L301

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:

https://vocms0113.cern.ch/seeworkflow?workflow=sagarwal_task_HIG-RunIIFall18wmLHEGS-00401__v1_T_181105_194527_4023

And an "action form" is needed for each task. Here there is just one single form for all the selected actions

dabercro commented 5 years ago

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.

vargasa commented 5 years ago

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?

dabercro commented 5 years ago

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.

sharad1126 commented 5 years ago

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.

sharad1126 commented 5 years ago

Clarifying the suggestions - Removing sites from ACDC action page where we can't run tasks at (blacklisted sites) for particular tasks/requests.

vargasa commented 5 years ago

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

dabercro commented 5 years ago

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.

vargasa commented 5 years ago

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?

screenshot_2019-01-25 wtc-console

sharad1126 commented 5 years ago

@vargasa looks good to me. I can use the console with you guys this Thursday and we can see how it is working!

vargasa commented 5 years ago

I'll close this as the main issue was addressed on https://github.com/CMSCompOps/wtc-console/pull/12