Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
!dc_measurements/package.xml
!dc_services/package.xml
!dc_cli/package.xml
!dc_destinations/package.xml
!fluent_bit_plugins/package.xml
!dc_common/package.xml
!dc_interfaces/package.xml
!dc_util/package.xml
!dc_description/package.xml
!dc_core/package.xml
!dc_group/package.xml
!fluent_bit_vendor/package.xml
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ msg/_*.py
**build_isolated/
**devel_isolated/

# Fluent Bit shared libraries
fluent_bit_plugins/src/go/out_minio/out_minio.so
fluent_bit_plugins/src/go/out_minio/out_minio.h
fluent_bit_plugins/src/go/out_files_metrics/out_files_metrics.so
fluent_bit_plugins/src/go/out_files_metrics/out_files_metrics.h

# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,3 @@ repos:
- id: poetry-requirements
name: Check requirements-dev.txt
args: [-o, requirements-dev.txt, --with, dev, --without-hashes]
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt
2 changes: 0 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ are already recorded there rather than in code comments.
| `dc_common` | Common support functionality used throughout the DC stack |
| `dc_measurements` | Collect data with Measurement plugins |
| `dc_group` | Group node — merges Records from several Measurements by time proximity |
| `dc_destinations` | Send Records to Destination plugins |
| `dc_services` | Collect uptime data |
| `dc_lifecycle_manager` | Controller/manager for the DC system's lifecycle nodes |
| `dc_interfaces` | Data collection ROS interfaces (msgs/srvs) |
Expand All @@ -37,7 +36,6 @@ are already recorded there rather than in code comments.
| `dc_demos` | Demo packages |
| `dc_simulation` | Warehouse simulation |
| `dc_util` | General shared headers |
| `fluent_bit_plugins`, `fluent_bit_vendor` | Embedded Fluent Bit (humble-era); being demolished per ADR-0001 in the `jazzy` line |

## Build / lint

Expand Down
30 changes: 24 additions & 6 deletions dc_bridge/test/supervisor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ SupervisorConfig sh(const std::string& script, std::chrono::milliseconds backoff
cfg.restart_backoff = backoff;
return cfg;
}

// Polls `pred` until it's true or `timeout` elapses. A fixed sleep_for() followed by a
// single assertion assumes the supervised child (fork+exec, then whatever it runs) is
// always scheduled within that margin — a loaded/shared CI runner can stall it well
// past a couple hundred milliseconds, which made RestartsProcessThatExitsOnItsOwn and
// RespectsRestartBackoff flaky. Polling only waits as long as actually needed and
// still fails loudly if the condition is never met by the deadline.
template <typename Pred>
bool wait_until(Pred pred, std::chrono::milliseconds timeout = std::chrono::seconds(5))
{
const auto deadline = std::chrono::steady_clock::now() + timeout;
while (std::chrono::steady_clock::now() < deadline)
{
if (pred())
{
return true;
}
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
return pred();
}
} // namespace

TEST(Supervisor, RestartsProcessThatExitsOnItsOwn)
Expand All @@ -30,8 +51,7 @@ TEST(Supervisor, RestartsProcessThatExitsOnItsOwn)
s.start();
EXPECT_TRUE(s.is_running());

std::this_thread::sleep_for(std::chrono::milliseconds(300));
EXPECT_FALSE(s.is_running());
EXPECT_TRUE(wait_until([&] { return !s.is_running(); })) << "child never exited";

EXPECT_TRUE(s.poll_restart());
EXPECT_TRUE(s.is_running());
Expand All @@ -41,12 +61,10 @@ TEST(Supervisor, RespectsRestartBackoff)
{
Supervisor s(sh("exit 1", std::chrono::seconds(60)));
s.start();
std::this_thread::sleep_for(std::chrono::milliseconds(200));
EXPECT_FALSE(s.is_running());
EXPECT_TRUE(wait_until([&] { return !s.is_running(); })) << "child never exited";

EXPECT_TRUE(s.poll_restart()); // first restart is immediate (no prior exit recorded)
std::this_thread::sleep_for(std::chrono::milliseconds(200));
EXPECT_FALSE(s.is_running());
EXPECT_TRUE(wait_until([&] { return !s.is_running(); })) << "child never exited";

EXPECT_FALSE(s.poll_restart()); // second exit within the 60s backoff window
}
Expand Down
19 changes: 7 additions & 12 deletions dc_bringup/launch/dc_bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,10 @@ def generate_launch_description():
parameters=[configured_params],
arguments=["--ros-args", "--log-level", log_level],
),
# destination_server (dc_destinations) is COLCON_IGNOREd on the jazzy line pending
# the DC 2.0 embedded-Fluent-Bit demolition slice (#241/#242); dc_bridge stands
# in its place, forwarding Records to the Vector shipper it supervises internally
# (ADRs 0001/0006/0007). It is a plain node outside the lifecycle manager, so it
# isn't in lifecycle_manager_dc's node_names; launch respawn supervises it
# unconditionally (ADR-0006), independent of use_respawn.
# dc_bridge spawns and supervises the Vector shipper and forwards Records to
# it. It's a plain node outside the lifecycle manager (not in
# lifecycle_manager_dc's node_names, see ADR-0006), so launch respawn
# supervises it unconditionally, independent of use_respawn.
Node(
package="dc_bridge",
executable="dc_bridge",
Expand Down Expand Up @@ -339,12 +337,9 @@ def generate_launch_description():
parameters=[configured_params],
arguments=["--ros-args", "--log-level", log_level],
),
# destination_server (dc_destinations) is COLCON_IGNOREd on the jazzy line pending
# the DC 2.0 embedded-Fluent-Bit demolition slice (#241/#242); dc_bridge stands
# in its place. It isn't built/registered as an rclcpp_components plugin, so it
# always runs as a plain node (ADR-0006), even when the rest of the stack is
# composed; launch respawn supervises it unconditionally, independent of
# use_respawn.
# dc_bridge isn't built/registered as an rclcpp_components plugin, so it always
# runs as a plain node (ADR-0006), even when the rest of the stack is composed;
# launch respawn supervises it unconditionally, independent of use_respawn.
Node(
package="dc_bridge",
executable="dc_bridge",
Expand Down
4 changes: 2 additions & 2 deletions dc_bringup/params/dc_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ dc_bridge:
# scanned for the `local_paths`/`remote_paths` File references Measurements embed
# (camera, map, …), each File is uploaded (multipart + resumable for large ones)
# and verified, and per-File status plus group-completion metadata Records are
# routed to `files.metadata_destination`. The destination name ("minio" here) must
# routed to `files.metadata_destination`. The destination name ("rustfs" here) must
# match the key the Measurement writes under `remote_paths`.
#
# minio:
# rustfs:
# type: s3
# receives: files
# inputs: ["/dc/measurement/camera"]
Expand Down
64 changes: 0 additions & 64 deletions dc_core/include/dc_core/destination.hpp

This file was deleted.

142 changes: 0 additions & 142 deletions dc_destinations/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions dc_destinations/COLCON_IGNORE

This file was deleted.

Loading
Loading