Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Testing the claim: a degraded-link matrix as a required CI gate

This is a writeup of building a required CI gate for degraded-network behavior. The system under test is a robotics fleet substrate, but the finding applies to anyone shaping networks in CI. Ganglion exists to reach robots on networks nobody controls. Warehouse Wi-Fi, carrier CGNAT, a hospital VLAN, a customer firewall that was configured once in 2019 and has not been touched since. Until this…

This article details the creation of a required CI gate to test a robotics fleet substrate under degraded network conditions. The system, called Ganglion, runs over various network profiles to ensure that the system can handle network issues that engineers typically don't encounter in a controlled environment. These conditions include packet loss, high latency, asymmetric connections, and no direct route between endpoints.

Initially, the design attempted to use netem to create lossy network conditions with a repeatable seed, but it soon became clear that netem does not support deterministic seeds. This realization led to the rejection of this approach, as a gate that fails randomly is worse than no gate at all. The final solution used deterministic delay, constant delay with zero jitter, and rate caps for bandwidth, which are all reproducible and reliable.

The gate was built using existing network shaping mechanisms and a harness that ran the deploy, invoke, and verify process through a relay. This approach avoided creating a separate network test that would not exercise the actual product path. Each run was recorded in a JSON artifact, detailing the mode, seed, shaping commands, duration, and results. This allowed for replaying failing runs and identifying genuine bugs.

To keep CI costs low, the gate was implemented as a single required-gate job, not five parallel jobs. The profiles ran sequentially inside the job, and only the build was repeated for all five profiles. The gate only ran on main pushes, not every push, and early exits were allowed for documentation-only pushes. The de-flaking pass, which retries the run once and attaches compose logs on failure, was also implemented to prevent flaky gates from being disabled.

After implementing the gate, all five deterministic profiles passed on the main branch. The gate now includes clean, lossy, high-latency, asymmetric, and nat-relay profiles, providing a comprehensive test suite for the robotics fleet substrate.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Imagine Having a Heroku Mobile App

I built a native mobile app for the entire Heroku platform. Towards the end of 2023, I transitioned from a job in banking into a full-fledged software development role.

  • Developer completed Heroku mobile app in 6 months
  • App includes dashboard features and enterprise license monitoring
  • Live notifications powered by SignalR

More from Wednesday 19 August →