Repository navigation
Conversation
bburda
force-pushed
the
feat/rosbag-retention-4b
branch
from
December 1, 2026 15:43
ac25c6c to
26017d1
Compare
bburda
force-pushed
the
feat/rosbag-retention-4b
branch
from
December 2, 2026 12:15
26017d1 to
7a1b385
Compare
* feat(fault_manager): max_age_sec per rosbag retention rule and the age sweep * fix(fault_manager): the age sweep logs the time it decided with
bburda
force-pushed
the
feat/rosbag-retention-4b
branch
from
December 2, 2026 18:24
7a1b385 to
54193a6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Today a recording stays until the quota or a clear removes it, however old it is. Issue 705 asks for an age limit per status. This PR adds the rule field
max_age_secwith the keysactive,healedandcleared, and a periodic sweep that applies it.This PR is on top of eight PRs in the stack. Please review those first. The diff of this PR is against the branch of the PR directly below it.
What it adds:
max_age_sec.active|healed|cleared(seconds, default0= no limit). A fault's recordings go when the fault is in that status and its last FAILED report is older than the limit.activemeans PREFAILED, PREPASSED or CONFIRMED. Each key resolves on its own across the four rule levels, so an explicit0at a more specific level keeps that key off.sweep_interval_sec(1-86400, default 60). The sweep runs on the retention worker only while some level sets a limit above0; otherwise there is no timer. The startup policy line sayssweep: offorsweep: every <n> s.docs/config/fault-manager.rst,docs/tutorials/snapshots.rst, the example retention file, the fault manager README and design doc.What changes for users
max_age_secand top-levelsweep_interval_sec. An invalid value is reported asROSBAG_RETENTION_CONFIG_INVALID.Recording removed: <recording_id> (max_age_sec.<status>)per removed recording, andretention sweep: removed=<links>at DEBUG per pass.Issue
Type
Testing
colcon build --packages-up-to ros2_medkit_fault_manager --cmake-args -DPOSTGRES_SUPPORT=ON, thencolcon test --packages-select ros2_medkit_fault_manager(withROS2_MEDKIT_TEST_PG_CONNfor the PostgreSQL cases) andcolcon test-result --verbose.The real-process test is
src/ros2_medkit_fault_manager/test/integration/test_rosbag_max_age.test.py. It covers:0at a more specific level;test_rosbag_quota_pg.test.pyhas the PostgreSQL case.I ran this on Jazzy with PostgreSQL 14. Humble and Lyrical run in CI. clang-tidy on the changed files reports nothing new.
Checklist