Skip to content

database: add max_sched_jobs property for associations in flux-accounting DB#789

Merged
mergify[bot] merged 5 commits intoflux-framework:masterfrom
cmoussa1:add.max-sched-jobs.property
Jan 20, 2026
Merged

database: add max_sched_jobs property for associations in flux-accounting DB#789
mergify[bot] merged 5 commits intoflux-framework:masterfrom
cmoussa1:add.max-sched-jobs.property

Conversation

@cmoussa1
Copy link
Member

@cmoussa1 cmoussa1 commented Dec 8, 2025

Problem

The flux-accounting database needs a way to track and configure a max_sched_jobs property 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_table called max_sched_jobs, an integer representing the max number of jobs in SCHED state an association can have at any given time. This allows a max_sched_jobs property to be defined per-association.

This change requires incrementing the DB_SCHEMA version number with the addition of the new column. A new --max-sched-jobs optional argument is added to the commands that deal with adding, editing, and viewing associations in association_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_jobs for associations in the database.

@cmoussa1 cmoussa1 added new feature new feature commands related to the flux-accounting commands/bindings database related to the flux-accounting database labels Dec 8, 2025
@cmoussa1 cmoussa1 force-pushed the add.max-sched-jobs.property branch 2 times, most recently from 845cb19 to 4c2ed4a Compare December 11, 2025 02:48
@cmoussa1 cmoussa1 force-pushed the add.max-sched-jobs.property branch 2 times, most recently from 1fcb0b2 to c49ba5e Compare January 5, 2026 18:27
@cmoussa1 cmoussa1 requested a review from jameshcorbett January 5, 2026 18:44
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.

Nice! But the new property isn't checked anywhere yet right? Is that for a future PR?

@cmoussa1
Copy link
Member Author

cmoussa1 commented Jan 5, 2026

Thanks @jameshcorbett! Yes, the actual implementation for checking and setting a max-sched-jobs property is proposed in #790 to keep the PR from growing way too cumbersome to review. I will probably hold off on merging this one until after v0.55.0 has been released to land both this and #790 in one release.

@cmoussa1 cmoussa1 force-pushed the add.max-sched-jobs.property branch from c49ba5e to bcab202 Compare January 6, 2026 18:01
@cmoussa1 cmoussa1 force-pushed the add.max-sched-jobs.property branch 3 times, most recently from f306152 to 7c18aa4 Compare January 20, 2026 17:14
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.
@cmoussa1 cmoussa1 force-pushed the add.max-sched-jobs.property branch from 7c18aa4 to bc19170 Compare January 20, 2026 17:16
@cmoussa1
Copy link
Member Author

Thanks for reviewing this @jameshcorbett. Now that #790 is approved, I'll go ahead and merge this so I can also land #790

@mergify mergify bot added the queued label Jan 20, 2026
@mergify mergify bot merged commit e88cb12 into flux-framework:master Jan 20, 2026
16 checks passed
@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2026

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.
The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = coverage
    • check-neutral = coverage
    • check-skipped = coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = el8 - distcheck
    • check-neutral = el8 - distcheck
    • check-skipped = el8 - distcheck
  • any of [🛡 GitHub branch protection]:
    • check-success = el8 - py3.6
    • check-neutral = el8 - py3.6
    • check-skipped = el8 - py3.6
  • any of [🛡 GitHub branch protection]:
    • check-success = jammy - py3.6
    • check-neutral = jammy - py3.6
    • check-skipped = jammy - py3.6
  • any of [🛡 GitHub branch protection]:
    • check-success = spelling
    • check-neutral = spelling
    • check-skipped = spelling
  • any of [🛡 GitHub branch protection]:
    • check-success = python format
    • check-neutral = python format
    • check-skipped = python format
  • any of [🛡 GitHub branch protection]:
    • check-success = python lint
    • check-neutral = python lint
    • check-skipped = python lint
  • any of [🛡 GitHub branch protection]:
    • check-success = validate commits
    • check-neutral = validate commits
    • check-skipped = validate commits

@mergify mergify bot removed the queued label Jan 20, 2026
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.85%. Comparing base (c22fe69) to head (bc19170).
⚠️ Report is 6 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands related to the flux-accounting commands/bindings database related to the flux-accounting database merge-when-passing new feature new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants