Job and pilot-related scripts
At the November 9 BiLD-Dev meeting, we discussed about the rationalisation of the script names concerning pilots and jobs.
There is the current list of these scripts and their location:
dirac-admin-get-job-pilot-output -> DIRAC/Interfaces/scripts/
dirac-admin-get-job-pilots -> DIRAC/Interfaces/scripts/
dirac-admin-get-pilot-info -> DIRAC/Interfaces/scripts/
dirac-admin-get-pilot-logging-info -> DIRAC/Interfaces/scripts/
dirac-admin-get-pilot-output -> DIRAC/Interfaces/scripts/
dirac-admin-kill-pilot -> DIRAC/WorkloadManagementSystem/scripts/
dirac-admin-pilot-summary -> DIRAC/Interfaces/scripts/
dirac-admin-reoptimize-jobs -> DIRAC/WorkloadManagementSystem/scripts/
dirac-admin-reset-job -> DIRAC/Interfaces/scripts/
dirac-wms-job-attributes -> DIRAC/Interfaces/scripts/
dirac-wms-job-delete -> DIRAC/Interfaces/scripts/
dirac-wms-job-get-input -> DIRAC/Interfaces/scripts/
dirac-wms-job-get-jdl -> DIRAC/Interfaces/scripts/
dirac-wms-job-get-output -> DIRAC/Interfaces/scripts/
dirac-wms-job-get-output-data -> DIRAC/Interfaces/scripts/
dirac-wms-job-kill -> DIRAC/Interfaces/scripts/
dirac-wms-job-logging-info -> DIRAC/Interfaces/scripts/
dirac-wms-job-parameters -> DIRAC/Interfaces/scripts/
dirac-wms-job-peek -> DIRAC/Interfaces/scripts/
dirac-wms-job-reschedule -> DIRAC/Interfaces/scripts/
dirac-wms-job-status -> DIRAC/Interfaces/scripts/
dirac-wms-job-submit -> DIRAC/Interfaces/scripts/
dirac-wms-jobs-select-output-search -> DIRAC/Interfaces/scripts/
dirac-wms-select-jobs -> DIRAC/Interfaces/scripts/
There are clearly inconsistencies in the location and the names of these scripts... for example dirac-admin-kill-pilot and dirac-wms-job-kill
AFAIU there is a (non-written) rule in DIRAC to name scripts with <verb>-<object>, i.e. kill-job rather than job-kill. The change was made some time ago on the API, but not in the scripts... Is this what we want?
Also some scripts use the verb get and some others don't. Similarly some are difficult to understand, e.g. dirac-admin-reset-job (what means resetting a job? help doesn't help...)
The fact that some scripts are meant for regular users (what is it?) and others for experts (admin?) is rather irrelevant as all scripts are visible, and even if ineffective because not enough karma is granted, this is not related to the name of the script but to the properties of the proxy group and the requested property in the service called.
I have committed to propose new names and locations. This will come soon in this issue...
To be discussed at the next BiLD. I agree that:
- "admin" or not "admin" makes no difference
- verb should go be before object
- the location of these scripts make little sense.
I prefer having the object before the verb, because it let's one further reduce the number of scripts to be seen by tab-completion, and the sorting of scripts is more meaningful.
Most of the time I know I want to do something with a job, but I don't remember the exact script name, but then dirac-wms-job-
We can apply a widely used pattern of subcommands, e.g. git. I mean having one command dirac-wms-job with several subcommands as a first argument:
dirac-wms-job submit dirac-wms-job status dirac-wms-job output ...
We do it already in several places, cf dirac-rms-request
But only if someone writes a bash-completion file for dirac-wms-job, because otherwise tab completion is not possible
Keep set and get, object before verb.