Repository navigation
Conversation
bburda
force-pushed
the
feat/rosbag-retention-6
branch
from
December 1, 2026 15:43
5a06a1f to
24748c3
Compare
bburda
force-pushed
the
feat/rosbag-retention-6
branch
from
December 2, 2026 12:15
24748c3 to
b23fb3b
Compare
* feat(fault_manager): change rosbag retention parameters while the node runs * fix(fault_manager): refuse mixed parameter sets; PostgreSQL case in the fault manager * fix(fault_manager): run retention passes only for age, floor or interval changes * fix: decide each floor step and open-time check with one retention policy
bburda
force-pushed
the
feat/rosbag-retention-6
branch
from
December 2, 2026 18:24
b23fb3b to
68ec80b
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 every rosbag retention parameter is read-only after startup, so
PUT .../configurations/snapshots.rosbag.retention...on the gateway answers 403. Issue 705 rule 10 asks that each retention parameter can be changed while the node runs: "A bad value is rejected with HTTP 400 and the reason. A valid value applies to existing recordings at once. Adding or removing a rule needs a restart."This PR is on top of twelve 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:
Writable retention parameters. Every retention parameter given at startup can be set. The top-level
min_free_disk_mbandsweep_interval_secare always declared, with their defaults. A key not given at startup is not declared, so a PUT of it answers 400 ("not declared"): adding a rule needs a restart.Validation. A change is checked as the whole configuration with the change applied, using the same parser as at startup. It is rejected only for errors it adds, so with two invalid values at startup each one can be fixed on its own. When the whole configuration becomes valid, the node leaves degrade and clears
ROSBAG_RETENTION_CONFIG_INVALID.Applied at once. The new policy is published right away. One job on the retention worker then applies it to existing recordings:
max_bagstrims at once;on_clearedoron_healedturning todeleteapplies to faults already in that status, after a status check under the fault manager's lock;A priority or
over_quotachange removes nothing. A storage failure logs a WARN, and the same PUT again retries.The gateway's parameter write, for every node:
1.5for an integer field reaches the node and is rejected. Before, it was truncated to1.Docs:
docs/config/fault-manager.rst(with a PUT example),docs/api/rest.rst, the gateway and fault manager READMEs, the design doc and the example retention file.What changes for users
Issue
Type
Testing
colcon build --packages-up-to ros2_medkit_fault_manager ros2_medkit_gateway ros2_medkit_integration_tests --cmake-args -DPOSTGRES_SUPPORT=ON, thencolcon testfor those packages andcolcon test-result --verbose.src/ros2_medkit_integration_tests/test/features/test_retention_runtime.test.pyruns a real gateway and real fault manager over HTTP. It covers:max_bagstrimming;test_retention_config.test.pycovers mixed and unset values.test_retention_runtime_pg.test.pycovers a storage failure during the job, and the retry.test_rosbag_storage_availability.test.pycovers a trim that leaves a recording of an unavailable storage alone.RosbagRetention.StatusActionSkipsAFaultActiveAgain, covers a fault that fails again between the job's list and its action. A real process cannot force that order.Checklist