Skip to content

chore(vdev): run e2e capture finalization in the harness - #27062

Open
tessneau wants to merge 23 commits into
masterfrom
tess.neau/vdev-e2e-lifecycle
Open

tessneau wants to merge 23 commits into
masterfrom
tess.neau/vdev-e2e-lifecycle

Conversation

@tessneau

@tessneau tessneau commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

OPA-6890

Summary

Moves e2e capture finalization from per-suite Python containers into vdev, as suggested in #26921 (review).

A test can now declare lifecycle.before_validation steps in its test.yaml. vdev runs them once in start, right after compose up:

  • wait_for_success: wait for a one-shot service to exit 0.
  • sleep_secs: pause, for consumers with no completion signal.
  • stop: stop a group of containers by service or label, then fail on a non-zero exit, an OOM kill or a rejected log message.
  • run: run a profile-only compose service to a successful exit.

When every step succeeds, vdev writes a completion marker, and vdev e2e test refuses to validate a running environment without it.

datadog-traces and opentelemetry-traces-multiservice now use these steps. Both drop their Docker-socket finalizers; the OTel test keeps only a small drain check that waits for the output Collector to write every input span.

The datadog-traces inventory service uses Rust with dd-trace-rs (datadog-opentelemetry 0.6.0), which sends native v0.4 payloads, so it needs no tracer protocol pin.

vdev is bumped to 0.3.46, because CI installs vdev by version and only builds the checkout when that version has no prebuilt binary. The published 0.3.45 binary does not include these lifecycle steps.

Failures now name the step and the cause instead of service "finalize-captures" didn't complete successfully:

Error: lifecycle step 2 (stop vector.datadog-traces.producer=true) failed
    vector-e2e-datadog-traces-7-84-6-inventory-1 exited with code 3

References

Follows #26921.

Vector configuration

N/A

How did you test this PR?

Current CI on 36e11ea9b9: trace-model E2E passed. The Datadog traces job built vdev 0.3.46 from the checkout, ran all four lifecycle steps, and passed all 6 tests on the first attempt. Multiservice OTel validation passed all 5 tests for each transport, with all seven lifecycle steps in the logs.

Previous CI on 00c53e622d: /ci-run-e2e-trace-model passed for datadog-traces (with the Rust service) and both OTel transports, with every lifecycle step in the logs. Locally, vdev e2e test also reruns against a finished environment.

The steps fail when they should: a producer exiting with code 3, a rejected Vector log line, unreadable Vector logs (logging: {driver: none}), and vdev e2e test against an environment whose lifecycle failed.

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

Contributor Guidelines

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Before pushing, follow our pre-push guidance.
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.

Native Python, Node and Go tracers send traffic through a pinned Datadog
Agent, which dual-ships the same payloads to fakeintake and to Vector's
datadog_agent -> datadog_traces relay. The test checks the input covers
the trace shapes the typed trace model RFC maps, and that every span
reaches the output exactly once and unchanged.
The client could start before the Node and Go services listened, failing
the run on slow starts. The frontend healthcheck now waits for both, the
Agent drops healthcheck traces, every checkout must contain spans from
all three tracers, and workload images rebuild on each start.
A producer that exited before finalization was missing from the
running-only container list, so its exit code was never checked. List
exited containers too, and stop only the running ones.
E2E tests can declare `lifecycle.before_validation` steps in test.yaml:
wait for a service to succeed, sleep, stop container groups with exit
and log checks, or run a one-shot service. vdev runs them after
`compose up`, and `test` refuses to validate an environment whose
lifecycle did not complete.

The datadog-traces and opentelemetry-traces-multiservice tests move
their Python finalizers into lifecycle steps, so neither mounts the
Docker socket anymore.

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

@github-actions github-actions Bot added the domain:vdev Anything related to the vdev tooling label Nov 5, 2026
CI installs vdev by version and only builds the checkout when that
version has no prebuilt binary, so the new test.yaml field needs a new
version.

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

@tessneau
tessneau marked this pull request as ready for review November 6, 2026 13:25
@tessneau
tessneau requested a review from a team as a code owner November 6, 2026 13:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T00:49:21.034366Z 36e11ea New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadoghq-integration datadoghq-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Failed container-log retrieval can silently bypass the shutdown-log guard and mark captures complete without verifying that Vector drained successfully.

Open Bits AI session

🤖 Bits Code Review · Commit 5ab0090

Base automatically changed from tess.neau/e2e-test-real-traces-dd-agent to master November 6, 2026 14:26

@datadoghq-integration datadoghq-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The specialist reported no actionable defects in lifecycle execution, trace validation, or CI integration. Docker-based execution remains unverified because the assessment was static.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 5ab0090

Command::output succeeds on a non-zero exit, so a failed docker logs
call had its error text searched and reject_log_messages silently
skipped. Containers are now looked up by label in one place.
@github-actions github-actions Bot added the domain:ci Anything related to Vector's CI environment label Nov 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to avoid introducing go code in this repo. Is https://github.com/DataDog/dd-trace-rs a viable alternative here?

@tessneau tessneau Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, yeah swapped here 3455b2b

the inventory service now uses dd-trace-rs (datadog-opentelemetry 0.6.0), which exports native v0.4 payloads with datadog propagation. Coverage is unchanged: all checkouts still span three tracers (python, nodejs, rust).

The inventory service now uses dd-trace-rs (datadog-opentelemetry), so
the repository no longer carries Go code. It exports native v0.4
payloads, which also removes the dd-trace-go protocol pin.

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

…lifecycle

# Conflicts:
#	Cargo.lock
#	tests/e2e/datadog-traces/README.md
#	tests/e2e/datadog-traces/config/compose.yaml
#	tests/e2e/datadog-traces/config/test.yaml
#	tests/e2e/datadog-traces/workload/python/frontend.py
#	tests/e2e/datadog/traces/mod.rs
#	vdev/Cargo.toml

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

@tessneau tessneau added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Nov 16, 2026
@tessneau
tessneau requested a review from pront November 16, 2026 17:23
@tessneau
tessneau added this pull request to stack #27231 November 17, 2026 15:35
The published 0.3.45 binary does not include lifecycle steps. Use 0.3.46 so CI falls back to building the checkout until this version is published.
@github-actions github-actions Bot removed the domain:ci Anything related to Vector's CI environment label Nov 25, 2026

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

…lifecycle-version-bump

# Conflicts:
#	Cargo.lock
#	vdev/Cargo.toml

@tessneau tessneau left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-e2e-trace-model

@pront pront left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you

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

domain:vdev Anything related to the vdev tooling no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants