flux-framework / flux-accounting

bank/accounting interface for the Flux resource manager
https://flux-framework.readthedocs.io/projects/flux-accounting/en/latest/index.html
GNU Lesser General Public License v3.0
3 stars 10 forks source link

`view-job-records`: add `--project` filter option #490

Closed cmoussa1 closed 1 month ago

cmoussa1 commented 2 months ago

Problem

There is no way to filter jobs by project when looking at job records in flux-accounting's jobs table. This could be a useful feature now that the priority plugin validates and annotates project names for jobs.


This PR adds a project column to the jobs table that can store an optional project name for each job. It then adds an optional argument to the view-job-records command --project which can filter jobs by project name:

flux account view-job-records --project=projectA

I've updated some existing tests that use the view-job-records command as well as added a new test file that tests filtering jobs by project name.

cmoussa1 commented 2 months ago

@ryanday36 would you like to give this PR a high-level look and let me know if this might be a useful feature? I thought this might be a first-crack at tackling #352 to make it easier to gather jobs by project.

ryanday36 commented 2 months ago

This definitely looks useful! Thanks @cmoussa1

cmoussa1 commented 2 months ago

Sounds great @ryanday36! Thanks for taking a look at it. I'll mark this as ready for review then.

cmoussa1 commented 1 month ago

Thanks @jameshcorbett! Setting MWP here