Skip to content

Feature/docker isolated testing and CI runner selection - #106

Open
martinrichtersupervag wants to merge 5 commits into
omg-dds:masterfrom
martinrichtersupervag:feature/docker-isolated-testing
Open

martinrichtersupervag wants to merge 5 commits into
omg-dds:masterfrom
martinrichtersupervag:feature/docker-isolated-testing

Conversation

@martinrichtersupervag

Copy link
Copy Markdown

Why

  • Eliminate RTPS Multicast Discovery Leakage:
    When running tests directly on a host machine, virtual machine, or LXC container, RTPS Simple Participant Discovery Protocol (SPDP) broadcasts UDP discovery packets (239.255.0.1:7400 on domain 0) across the local physical network.
  • Prevent Cross-Talk & Flaky Tests:
    If other DDS applications (such as ROS 2 or other local test runners) exist on the same local subnet and domain, mutual discovery occurs. This leads to unexpected endpoint matching, port collisions, and intermittent test failures.
  • Zero Host Environment Pollution:
    Eliminates the need for contributors to manually set up Python virtual environments, Node.js (xunit-viewer), or modify host system settings.
  • Self-Hosted Runner Resilience:
    Enables clean, isolated execution on self-hosted runners without requiring host sysctl or ip route modifications.

Changes

1. Docker Isolation & Tooling

  • Dockerfile: Pre-configured Ubuntu 22.04 image with Python 3, Node.js 20 LTS, xunit-viewer, and required test dependencies.
  • docker-compose.yml & .dockerignore: Container definition utilizing Docker's default bridge network to contain all RTPS multicast discovery.
  • run_tests_in_docker.sh: One-command automation script that archives previous reports, builds the image if needed, executes tests, merges reports, and cleans up.
  • run_in_docker.sh: Flexible helper for interactive shell or custom test runs (includes automated non-interactive TTY detection for CI).
  • generate_reports.sh: Standalone helper to merge JUnit XMLs via python3 -m junitparser and generate Excel (.xlsx) and HTML (index.html) reports.
  • run_tests.sh & .gitignore: Added automatic archiving of previous test runs into archive_reports/.

2. CI Workflow Improvements (1_run_interoperability_tests.yml)

  • Runner Environment Selection: Added runner input parameter (defaults to ubuntu-latest, also supports self-hosted).
  • Automated Runner Detection: Automatically executes inside the isolated Docker container when running on self-hosted runners (RUNNER_ENVIRONMENT == "self-hosted"), while keeping direct execution on GitHub-hosted cloud runners.
  • Matrix Resilience (fail-fast: false): Prevents GitHub Actions from aborting the remaining 63 matrix test pairs when one vendor pair fails.
  • Fork Compatibility: Added repository: "omg-dds/dds-rtps" to release-downloader so workflows can run in forked repositories.
  • Cross-Platform Reliability: Changed junitparser merge to python3 -m junitparser merge to avoid issues when the binary is not in system $PATH.

3. Documentation & Legal

  • README.md: Added Section 3.5 documenting Docker test execution and added a runner environment selection note in Section 4.
  • CLA/CLA_Martin_Richter.md: Added signed Contributor License Agreement according to CONTRIBUTING.md.

How to test

1. Test Single Test / Custom Pair inside Docker

Run an ad-hoc test between two vendors inside the isolated Docker container:

./run_in_docker.sh python3 interoperability_report.py \
    -P executables/eprosima_fastdds*shape_main_linux \
    -S executables/opendds*shape_main_linux \
    -t basic_default_test

- Add Dockerfile based on Ubuntu 22.04 with Python 3, Node.js (xunit-viewer), and required test suite dependencies.
- Add docker-compose.yml and .dockerignore.
- Add run_in_docker.sh and run_tests_in_docker.sh automation scripts.
- Add generate_reports.sh to merge JUnit XML and produce XLSX/HTML reports.
- Update run_tests.sh and .gitignore to archive previous reports.
- Document Docker execution and network isolation in README.md.

This provides a fully reproducible and containerized test execution environment.
By utilizing Docker's default bridge network, RTPS multicast discovery (239.255.0.1
and 224.0.0.0/4) is contained inside the container, preventing discovery packets from
leaking into the host LAN or interfering with concurrent test instances (especially in
LXC or VM environments).
…ibility

- Add runner input (defaults to ubuntu-latest) allowing execution on self-hosted runners.
- Set fail-fast: false to ensure all matrix test pairs complete even if one fails.
- Specify repository: 'omg-dds/dds-rtps' for release-downloader so tests can run in forks.
- Use python3 -m junitparser to merge XML reports reliably across systems.
- Add --break-system-packages fallback for pip install and continue-on-error for setup-python.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant