Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Experimental: Add JobList constraint parser and support constraint query strings in flux jobs -f #5711

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Aug 12, 2024

  1. python: add assumeFuture argument to flux.util.parse_datetime

    Problem: The parse_datetime() utility function is statically configured
    to assume future dates when a term like "Friday" is given. That is,
    instead of giving the date for the previous Friday, the function will
    return then next Friday instead. This behavior should be configurable.
    
    Add an assumeFuture parameter to the function which defaults to True.
    If set to False, then parse_datetime() will assume dates in the past
    instead.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    8e9a03d View commit details
    Browse the repository at this point in the history
  2. python: add convert_values member to ConstraintParser class

    Problem: Values are always returned as strings by the ConstraintParser
    parser, but there are times when another type may be more
    suitable. Additionally, there is currently no way to reduce a set
    of values to a single element if this is required or beneficial in
    the result.
    
    Add a convert_values mapping to the ConstraintParser class. If an
    operator is in this dictionary, then the values of a term are passed
    to the provided callable, which should return a new list of values
    as a result.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    95386e5 View commit details
    Browse the repository at this point in the history
  3. python: add flux.job.info.strtostate and strtoresult

    Problem: flux_job_strtostate(3) and flux_job_strtoresult(3) are not
    exposed in the Python API.
    
    Add strtostate() and strtoresult() to flux.job.info.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    2ff0ec9 View commit details
    Browse the repository at this point in the history
  4. python: add JobListConstraintParser

    Problem: There is no user friendly way to create constraint objects
    that can be used with the job-list service.
    
    Add a JobListConstraintParser class which can be used to create
    RFC 31 constraing objects suitable for sending to the job-list service.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    95a817d View commit details
    Browse the repository at this point in the history
  5. python: add flux.util.FilterActionConcatenate

    Problem: The flux-jobs(1) -f, --filter option is being updated to
    take a query string, but there is no "filter" based argparse action
    to handle this case.
    
    Add flux.util.FilterActionConcatenate which concatenates multiple
    --filter strings together, separated by space.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    12d87a8 View commit details
    Browse the repository at this point in the history
  6. flux-jobs: support constraint query string with -f, --filter

    Problem: There is no way to provide an arbitrary constraint to
    flux-jobs(1).
    
    Update the `-f, --filter` option of flux-jobs(1) to take a query string
    that will be passed to the JobList constraint parameter instead of
    the filter paramter.
    grondo committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    635a4cc View commit details
    Browse the repository at this point in the history