Skip to content

fix(tests/library_conf): fix payload normalization issue#7319

Closed
MilanGarnier wants to merge 2 commits into
mainfrom
milan.garnier/fix-library-conf-payload-normalization
Closed

fix(tests/library_conf): fix payload normalization issue#7319
MilanGarnier wants to merge 2 commits into
mainfrom
milan.garnier/fix-library-conf-payload-normalization

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

Node.js dev extraction-behavior end-to-end tests already emit the expected span link, but the test helper fails while normalizing _dd.span_links. The v1 payload parser has already decoded that metadata into a list, and the helper attempts to decode it a second time.

Changes

  • Accept both serialized and already-decoded _dd.span_links metadata in extraction-behavior assertions.
  • Preserve the legacy JSON decoding path.
  • Validation: mypy and ruff passed through ./format.sh; the untouched YAML checks could not start because this fresh macOS worktree lacks sha256sum for the yamlfmt bootstrap. Focused pytest collection passed: venv/bin/pytest --collect-only -q tests/test_library_conf.py::Test_ExtractBehavior_Default::test_multiple_tracecontexts.

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?

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/test_library_conf.py                                              @DataDog/system-tests-core

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 16, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/system-tests | jetty-app.arm64.DOC: [public.ecr.aws/lts/ubuntu:22.04, linux/arm64, 17.0.15-zulu]   View in Datadog   GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: be89402 | Docs | Datadog PR Page | Give us feedback!

…race payload format

_get_span_link_trace_id assumed link["traceID"] was always a hex string
under the efficient format, but decoded native span links already
provide it as an int, causing TypeError: int() can't convert
non-string with explicit base.

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I just merged two PR that cleans all this abstraction, and, in theory, should fix some issue : #7325 and #7327.

You may need to rebase, and move this change into the new abstraction.

@MilanGarnier

MilanGarnier commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Oh thanks, this seems to completely fix my issue ! I'm closing this then

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.

2 participants