Skip to content

chore(ci): add code coverage collection for integration and e2e test suites#25088

Open
thomasqueirozb wants to merge 14 commits intomasterfrom
ci/coverage-suite
Open

chore(ci): add code coverage collection for integration and e2e test suites#25088
thomasqueirozb wants to merge 14 commits intomasterfrom
ci/coverage-suite

Conversation

@thomasqueirozb
Copy link
Copy Markdown
Contributor

@thomasqueirozb thomasqueirozb commented Mar 31, 2026

Summary

Adds code coverage instrumentation to the integration and e2e test suites, making coverage additive across all test types (unit, component validation, integration, e2e). Results are merged into a single lcov report and uploaded to Datadog.

Key changes:

  • vdev int/e2e test --coverage: new flag that switches to cargo llvm-cov nextest and mounts a host directory for the coverage output
  • Makefile: COVERAGE=true/false controls whether make test / make test-component-validation use cargo nextest or cargo llvm-cov nextest --no-report; make coverage-report emits the merged lcov.info
  • scripts/run-integration-test.sh: -c flag enables coverage and normalizes container paths (SF:/home/vector/) to relative paths for clean merging
  • .github/workflows/unit-tests.yml: new reusable workflow extracted from test.yml; used by both the test suite and the coverage workflow
  • .github/workflows/integration.yml: supports workflow_call with coverage input, enabling reuse from the coverage workflow
  • .github/workflows/coverage.yml: rewritten as a scheduled (weekly) + on-demand workflow that runs all suites with coverage and uploads the merged report to Datadog
  • .github/workflows/ci-review-trigger.yml: adds /ci-run-coverage trigger

Vector configuration

NA

How did you test this PR?

Tested locally with scripts/run-integration-test.sh -c int mqtt to verify the lcov output and path normalization.

/ci-run-coverage

CI Run

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

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.

References

NA

@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Mar 31, 2026
@github-actions github-actions bot added domain: ci Anything related to Vector's CI environment domain: vdev Anything related to the vdev tooling labels Mar 31, 2026
thomasqueirozb

This comment was marked as outdated.

thomasqueirozb

This comment was marked as outdated.

thomasqueirozb

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

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

/ci-run-coverage

@thomasqueirozb
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c1b0d972e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@thomasqueirozb thomasqueirozb marked this pull request as ready for review April 1, 2026 23:06
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner April 1, 2026 23:06
@thomasqueirozb thomasqueirozb enabled auto-merge April 1, 2026 23:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02162c3cf7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 999a083914

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@thomasqueirozb
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9a4ded61c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d9f8664f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 36 to 38
for environment in environments {
ComposeTest::generate(local_config, integration, environment, retries)?
ComposeTest::generate(local_config, integration, environment, retries, coverage)?
.test(args.to_owned())?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve coverage across all auto-selected environments

When coverage is enabled and no specific environment is provided, this loop runs every discovered environment sequentially, but each run writes to the same lcov.info output path (see vdev/src/testing/runner.rs where coverage always uses --output-path .../lcov.info). That means later environments overwrite earlier ones, so vdev int/e2e test --coverage reports only the last environment for multi-environment suites unless callers implement extra merge logic.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: ci Anything related to Vector's CI environment 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.

1 participant