• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Unleash / unleash-edge / 39744953810
83%

Build:
DEFAULT BRANCH: main
Ran 22 Oct 2026 08:10AM UTC
Jobs 1
Files 81
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Oct 2026 08:03AM UTC coverage: 82.886% (+0.5%) from 82.416%
39744953810

push

github

web-flow
fix(instance-data): recover from failed upstream posts (#1950)

## About the changes

First step of [fixing the issue with 413s throwing forever](https://linear.app/unleash/issue/EG-4793/make-edge-instance-data-respect-payload-size-limits):

We stop the bleeding on the side of the customer: Edge stops getting stuck when the server rejects a report

Closes #EG-4858


### What was going wrong?

Each Edge Instance sends to Unleash server some metrics every 60''.
A customer’s report got too big (server's limit is at 100 KB on request bodies) and got replied `413 Payload Too Large`.

That's fine. But then Edge did ...nothing. It kept the report it had just failed to send, waited 60'', added everything that had arrived in the meantime, and sent an even bigger one. Then ...a bigger one. Forever, until somebody restarted the process.

### Why it happened?

the code knew what to do about exactly 2 failures:

```rust
StatusCode::NOT_FOUND  => { /* clear the buffer, slow down */ }
StatusCode::FORBIDDEN  => { /* same */ }
_                      => { /* log a warning ... and see ya next time! */ }
```
the `_ ` catches all rest of failures, and `413` fell into it, same would do a `500`, `429`, and every network timeout. 
We didn’t clear the buffer and didn’t increment the counter that controls the retry delay -> so Edge never slowed down. It just kept going with an ever-growing payload.

this was never ONLY a 413 bug.  The customer just happened to find it via 413. Any other failure would have the same stack state.

### And now?

We give every failure a certain behavior (same way as the other metrics in Edge work):

- 413 too large	= > throw the buffer away. No slow down. - It’ll never fit. Dropping it is what makes the next one smaller
- 400 bad request	=> throw it away	- It’ll never be accepted either
- 403 / 404	=> no change by purpose
- 429, 5xx, timeouts	=> keep buffer, slow down	- their problem, probably temporary, the data is still good
- 200 => buffer empty... (continued)

106 of 113 new or added lines in 1 file covered. (93.81%)

7 existing lines in 2 files now uncovered.

14089 of 16998 relevant lines covered (82.89%)

4472.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
84.34
34.01% crates/oss/unleash-edge-http-client/src/instance_data.rs

Coverage Regressions

Lines Coverage ∆ File
6
95.41
-0.26% crates/enterprise/unleash-edge-context-enrichers/src/driver.rs
1
84.34
34.01% crates/oss/unleash-edge-http-client/src/instance_data.rs
Jobs
ID Job ID Ran Files Coverage
1 39744953810.1 22 Oct 2026 08:10AM UTC 81
82.89
GitHub Action Run
Source Files on build 39744953810
  • Tree
  • List 81
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39744953810
  • bb317cfc on github
  • Prev Build on main (#38583783924)
  • Next Build on main (#39767897162)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc