database: add max_sched_jobs property for associations in flux-accounting DB#789
Conversation
845cb19 to
4c2ed4a
Compare
1fcb0b2 to
c49ba5e
Compare
jameshcorbett
left a comment
There was a problem hiding this comment.
Nice! But the new property isn't checked anywhere yet right? Is that for a future PR?
|
Thanks @jameshcorbett! Yes, the actual implementation for checking and setting a |
c49ba5e to
bcab202
Compare
f306152 to
7c18aa4
Compare
Problem: The association_table needs to store a "max_sched_jobs" property for each association. Add a new column to the association_table called max_sched_jobs, an integer representing the max number of jobs in SCHED state an association can have at any given time. Increment the DB_SCHEMA version number with the addition of the new column to association_table. Update tests in t1017-update-db.t to account for the new column.
Problem: The flux-accounting database from before the addition of the new "max_sched_jobs" column to the association_table is not in the testsuite, but it should be a part of the update-db tests since the schema has changed. Add a flux-accounting DB with schema version 31 to the testsuite.
Problem: There needs to be a way to specify the "max_sched_jobs" column on the command line. Add a new optional argument to the user commands that deal with viewing and editing properties of an association called --max-sched-jobs, an integer representing the max number of jobs in SCHED state an association can have at any given time.
Problem: The add-user, edit-user, list-users, and edit-all-users man(1) pages do not list the --max-sched-jobs optional argument. Update the man(1) pages with the new optional argument.
Problem: There are no tests that check max_sched_jobs properties for an association with the add-user, edit-user, list-users, and edit-all-users commands. Add some basic tests.
7c18aa4 to
bc19170
Compare
|
Thanks for reviewing this @jameshcorbett. Now that #790 is approved, I'll go ahead and merge this so I can also land #790 |
Merge Queue Status✅ The pull request has been merged at bc19170 This pull request spent 6 seconds in the queue, with no time running CI. Required conditions to merge
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #789 +/- ##
=======================================
Coverage 82.85% 82.85%
=======================================
Files 27 27
Lines 2444 2444
=======================================
Hits 2025 2025
Misses 419 419 🚀 New features to boost your workflow:
|
Problem
The flux-accounting database needs a way to track and configure a
max_sched_jobsproperty for an association, i.e. set a limit on how many jobs can be in SCHED state for an association at any given time.This PR adds a new column to
association_tablecalledmax_sched_jobs, an integer representing the max number of jobs in SCHED state an association can have at any given time. This allows amax_sched_jobsproperty to be defined per-association.This change requires incrementing the
DB_SCHEMAversion number with the addition of the new column. A new--max-sched-jobsoptional argument is added to the commands that deal with adding, editing, and viewing associations inassociation_table. The corresponding man(1) pages are also updated to include the new optional argument.Basic tests are added for those commands to include configuring
max_sched_jobsfor associations in the database.