Skip to content

v1 protocol: Implemented replay support for auto_inject tests.#6582

Open
AlexeyKuznetsov-DD wants to merge 1 commit intomainfrom
alexeyk/replay-for-ssi-test-appsec
Open

v1 protocol: Implemented replay support for auto_inject tests.#6582
AlexeyKuznetsov-DD wants to merge 1 commit intomainfrom
alexeyk/replay-for-ssi-test-appsec

Conversation

@AlexeyKuznetsov-DD
Copy link
Contributor

Motivation

Support v1 protocol for dd-trace-java

Changes

Implemented replay support for auto_inject tests.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Mar 25, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested a review from a team as a code owner March 25, 2026 02:22
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

tests/auto_inject/utils.py                                              @DataDog/system-tests-core
utils/_context/_scenarios/auto_injection.py                             @DataDog/system-tests-core
utils/onboarding/backend_interface.py                                   @DataDog/system-tests-core

Copy link

@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: c90e1f3d22

ℹ️ 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 +149 to +151
prefix = "Http request done with uuid: ["
if msg.startswith(prefix):
return msg.removeprefix(prefix).split("]", 1)[0]

Choose a reason for hiding this comment

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

P2 Badge Don’t derive replay UUID solely from "Http request" log

Replay UUID extraction assumes the JSON report contains a log entry starting with "Http request done with uuid: [", but that message is only emitted in the non-krunvm request path; _check_install()’s krunvm branch does not log this prefix. For krunvm-based auto-inject runs, replay will consistently raise Could not find recorded request uuid... even though the original run succeeded.

Useful? React with 👍 / 👎.

assert validator(request_uuid, trace_data), (
f"{validator.__name__} failed to validate trace_id: {request_uuid}"
)
return

Choose a reason for hiding this comment

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

P2 Badge Preserve profiling assertions in replayed install checks

In replay mode, _test_install(..., profile=True) returns before any profiling validation is performed, so profiling tests become pass-throughs. This is a regression in replay semantics for profiling scenarios: if a code change breaks profiling assertions, replayed tests will still pass because the replay branch does not check recorded profile artifacts (despite now persisting them in replay_profiles).

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant