Skip to content

Wait for Fluent Forward before sending Docker test logs - #5434

Merged
freeqaz-openai merged 1 commit into
mainfrom
test/collector-fluent-forward-readiness
Nov 11, 2026
Merged

freeqaz-openai merged 1 commit into
mainfrom
test/collector-fluent-forward-readiness

Conversation

@freeqaz-openai

Copy link
Copy Markdown
Collaborator

The Docker logging integration test starts its first sender after the Collector's metrics endpoint returns HTTP 200. Docker's published port can already accept a connection while the Fluent Forward listener is still starting. In that interval the sender can exit successfully even when the Collector receives no record.

Wait for the Fluent Forward receiver to count an empty TCP connection opening and closing before starting the sender. One 30-second deadline covers the connection probes and full metrics responses. The near-match remains the first log record. The test verifies that the Collector filters it before the later senders run, then checks transport identity, secrecy, and recovery.

Verification

  • With Collector startup deliberately delayed on the normal Docker-published path, the baseline sender exited successfully and the filter wait timed out before any receiver series appeared. The test passed with the readiness check under the same delay and in a normal run. Each passing run executed one test with zero failures or skips.
  • With the metrics body stalled, the readiness check cancelled the request at its deadline. A complete scrape delivered after the deadline also failed the readiness check. Neither case reached the first sender.
  • The controlled delay reproduces a startup race. The cause of the earlier CI failures is unknown. Hosted checks are pending.

Wait until the Fluent Forward receiver observes an empty connection before sending the first test record. The metrics endpoint and Docker's published port can respond earlier.
@freeqaz-openai freeqaz-openai added the agent-created PR opened by an AI agent; does not identify the reviewer or approver. label Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR waits for Fluent Forward connection counters before sending the Docker logging test’s first record.

Example: Collector metrics return HTTP 200 before Fluent Forward is ready on port 24224.

  • Before: The sender can finish while its record never reaches the Collector, leaving the filter assertion to time out.
  • After: The test waits up to 30 seconds for receiver-observed connection activity before sending the near-match.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with no concrete finding; reported native Docker runs support it, while independently inspectable behavioral evidence is limited.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only PR is outside the ordinary contributor proof gate; its body reports real Docker delayed-start and deadline scenarios, but supplies no independently inspectable execution artifact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors can receive a misleading filtering failure when the first sender starts before the Collector receiver is ready.
Reason: The maintainer-authored change addresses fixture startup ordering through the existing real transport test and preserves its behavioral assertions.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored draft open: it addresses a concrete test-readiness race without weakening existing assertions, and no introduced correctness defect was found.

Priority: P3
Reviewed head: f312f0e353d5d62ce47622d1ff61a2800acd799e

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Docker integration fixture sends synthetic container logs through Docker’s Fluent logging driver and the pinned Collector to an OTLP capture backend.

flowchart LR
  Probe[Empty TCP probe] --> Receiver[Fluent Forward receiver]
  Receiver --> Metrics[Connection counters]
  Metrics --> Gate[Readiness gate]
  Gate --> Sender[Docker log sender]
  Sender --> Receiver
  Receiver --> Backend[OTLP capture backend]
Loading

Technical review

Best possible solution:

Retain the bounded receiver-readiness gate in the existing fixture while preserving its independent first-record filtering assertion.

Do we have a high-confidence way to reproduce the issue?

Source confirms metrics readiness was the only initial gate, and the PR reports a controlled delayed-start baseline failure; no target code was run during this review, and the earlier hosted failure remains unexplained.

Is this the best way to solve the issue?

The receiver’s own counters distinguish actual acceptance from Docker proxy connectivity, and an empty connection preserves the test’s first-log-record oracle.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0f82ccf02e7f.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Kevin: Raw commit b020ea5 adds tests/integration/logging-collector.test.mjs:134 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b020ea50de03; files: tests/integration/logging-collector.test.mjs)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a focused integration-test reliability repair with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused integration-test reliability repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 11, 2026, 3:23 AM ET / 08:23 UTC.

@freeqaz-openai
freeqaz-openai marked this pull request as ready for review November 11, 2026 09:06
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 11, 2026 09:06
@freeqaz-openai
freeqaz-openai merged commit 8c85a0a into main Nov 11, 2026
76 checks passed
@freeqaz-openai
freeqaz-openai deleted the test/collector-fluent-forward-readiness branch November 11, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-created PR opened by an AI agent; does not identify the reviewer or approver. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant