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

view-job-records: add --bank filter option #533

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

cmoussa1
Copy link
Member

Problem

There is no way to filter jobs by bank when looking at job records in flux-accounting's jobs table. As mentioned in #530, there is a need to be able to easily look at jobs associated with their bank.


This PR adds a bank column to the jobs table that can store an optional bank name for each job, fetched from the jobspec of each job. It is now included in the output of flux account view-job-records:

UserID     Username   JobID                T_Submit             T_Run                T_Inactive           Nodes      Project              Bank                
5001       5001       19797114880          1731364245.5573442   1731364245.583451    1731364245.693359    1          *                    bankA               
5001       5001       17599299584          1731364245.426189    1731364245.4502447   1731364245.6409955   1          *                    bankA  

It then adds an optional argument to the view-job-records command --bank which can filter jobs by bank name:

flux account view-job-records --bank=bankA

I've also added a new test file that tests filtering jobs by bank name.

@cmoussa1 cmoussa1 added new feature new feature medium priority items that should be worked on but are not urgent labels Nov 11, 2024
Problem: There is no way to filter jobs by bank when looking at job
records in flux-accounting's "jobs" table.

Add a "bank" column to the jobs table that will store an optional
bank name for each job. Update the schema version of the DB with the
addition of the column name.

Add an option to filter jobs by "bank" when adding job records to the
"jobs" table and while looking at job records with the view-job-records
command.
Problem: A new column is added to the "jobs" table, but the test file
that tests updating previous versions of flux-accounting DBs does not
contain the schema version of the DB before this addition.

Add the flux-accounting DB from v0.39.0 to the set of DBs tested in an
update in t1017-update-db.t.
There is an expected output file for t1011-job-archive-interface.t that
needs to be updated to account for the new "Bank" column in the output
output of the view-job-records command.

Update the expected output file to account for the addition of the new
"Bank" column.
Problem: There are no tests that ensure filtering jobs by bank works.

Add some basic tests.
@cmoussa1 cmoussa1 force-pushed the filter.jobs.by.bank branch from 7278f91 to 1c8ad78 Compare November 11, 2024 23:12
Copy link
Member

@jameshcorbett jameshcorbett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a solid new feature!

@cmoussa1
Copy link
Member Author

Appreciate it! I'll set MWP here

@mergify mergify bot merged commit 62e4e11 into flux-framework:master Nov 12, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium priority items that should be worked on but are not urgent merge-when-passing new feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants