Fix Flaky integration-test-kds Load Data Step

Open Beginner friendly
#4,766 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #4767 by @alexanderkiel — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
clojure, github-actions
Domain
ci-cd, testing

Research direction

Start in the GitHub Actions workflow that defines the integration-test-kds job and its Load Data step; that script is where the upload of the transaction bundle should be retried once before the total-number-of-resources check runs. For the follow-up, read blaze.validator.extern/validate, where the request to the external validator is wrapped in ac/exceptionally and every exception is collapsed into ba/busy; log the cause there before mapping it. Done means a flaky validator response no longer fails the job and the real error appears in the next failure's logs.

Written by the indexing model from the issue text.

Description

ci

Flaky-Test Report (2026-11-16 to 2026-11-23)

The CI job integration-test-kds failed 13 times in ~221 runs (5.9 %) in the last 7 days. It wasted about 2 hours of runner time, more than any other job. 11 of those failures happened in the step Load Data. The other 2 were apt failures in Install xq. Each time, the same commit passed on a re-run. Example: run 45009650428 attempt 1 failed, and attempt 2 passed on 24a68108.

All 11 Load Data failures look the same:

Status Codes     [code:count]             200:0, 503:1
    Code        : An internal timeout has occurred.
    Diagnostics : The external validator is currently unavailable.

What the logs of 11 failing jobs show:

  • Validator side: about 159 of the 160 entries of the transaction bundle (all PUTs) are validated successfully. The 503 follows only 3 to 9 ms after the last successful validator response.
  • Errors: the validator logs no error, exception or GC/OOM message, and its memory stays below the limit.
  • Blaze side: the data server logs only WARN [blaze.handler.util:145] - {... "The external validator is currently unavailable." ... :busy}.

blaze.validator.extern/validate maps any exception of the validator request to that busy anomaly (ac/exceptionally (fn [_] (ba/busy ...))) and discards the cause. So the actual error can't be seen. Candidates are a non-2xx response of the validator for a single resource, possibly caused by concurrent requests (max concurrency 4), or a response that can't be parsed. The validator is clearly up when this happens.

Proposed Change

Until the cause is known, retry the upload once. A failed transaction commits nothing, and the bundle consists only of PUTs, so the retry is idempotent. The total-number-of-resources check afterwards still verifies the result.

Follow-up

Log the cause in blaze.validator.extern/validate before mapping it to the busy anomaly, so the next failure shows the actual error.

Dominant language
Clojure
Stars
230
Forks
27
Avg merge
9h 20m
Merged PRs (30d)
149

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samply/blaze

All issues in samply/blaze

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.