-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Problem: job-list is currently limited in the kinds of general "queries" it can support (e.g. it only supports a single userid, limited set of "filters" etc.).
Without re-implementing job-list as a database (which still may be the correct long term solution), another idea would be to support a version of the Constraint syntax proposed in RFC 31. The benefit of this approach is that the implementation is fairly simple but powerful, and we already have a nice string syntax proposed to build Constraint JSON objects easily (RFC 35), along with a Python parser which could go into flux jobs or flux pgrep.
Some prevalent use cases include:
- list the jobs for > 1 user (
user:bob,alice) - list all jobs that ran or are running on a given node (
host:fluke16) - list all jobs that ran on a bad node since monday morning and failed (
host:fluke16 since:"Mon 8am" is:failed) - list jobs today that failed but were not canceled or timed out (
is:failed not (is:canceled or is:timeout))
etc.
The drawback to this approach is more work for the job-list module. It is possible that a user could construct a complex query which would act as a DoS for the service.