Skip to content

delete_bank(): update job usage after bank is removed with --force#808

Merged
mergify[bot] merged 2 commits intoflux-framework:masterfrom
cmoussa1:issue#802
Jan 26, 2026
Merged

delete_bank(): update job usage after bank is removed with --force#808
mergify[bot] merged 2 commits intoflux-framework:masterfrom
cmoussa1:issue#802

Conversation

@cmoussa1
Copy link
Member

Problem

Parent banks inadvertently keep the usage of a bank that is deleted with --force, which leads to inconsistent reporting.


This PR just adds an update for the job usage for the bank hierarchy when a bank is deleted with --force. A quick test is also added to ensure that parent banks' usage is also updated after a bank is removed with --force.

Fixes #802

Problem: The job usage for the rest of the hierarchy is not updated
after a bank is deleted with --force, which leads to inconsistencies
with how usage is reported throughout the hierarchy, i.e. the parent
banks will keep the usage of a bank that is deleted.

Update the job usage for the bank hierarchy when a bank is deleted with
--force.

Fixes flux-framework#802
Problem: There are no tests that check that a database hierarchy's job
usage is properly updated after a bank is deleted with --force.

Add some tests.
@cmoussa1 cmoussa1 added bug-fix a proposal for something that isn't working commands related to the flux-accounting commands/bindings labels Jan 22, 2026
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.

LGTM!

@cmoussa1
Copy link
Member Author

Thanks @jameshcorbett! Setting MWP here

@mergify mergify bot added the queued label Jan 26, 2026
@mergify mergify bot merged commit 3bc9503 into flux-framework:master Jan 26, 2026
15 of 16 checks passed
@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2026

Merge Queue Status

✅ The pull request has been merged at 33014de

This pull request spent 7 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 26, 2026
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.93%. Comparing base (3b48179) to head (33014de).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #808   +/-   ##
=======================================
  Coverage   82.93%   82.93%           
=======================================
  Files          27       27           
  Lines        2479     2479           
=======================================
  Hits         2056     2056           
  Misses        423      423           
🚀 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

bug-fix a proposal for something that isn't working commands related to the flux-accounting commands/bindings merge-when-passing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete-bank with --force doesn't propagate usage up to parent bank(s)

2 participants