Skip to content

[RUM-18297] Add ppdb-symbols upload command - #2491

Merged
rodrigol-ddog merged 10 commits into
masterfrom
rodrigol-ddog/maui-ppdb-upload-command
Oct 5, 2026
Merged

rodrigol-ddog merged 10 commits into
masterfrom
rodrigol-ddog/maui-ppdb-upload-command

Conversation

@rodrigol-ddog

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new datadog-ci ppdb-symbols upload command that uploads .NET Portable PDBs for MAUI apps, modeled on pe-symbols upload, to enable server-side symbolication of managed C# exception stack traces.
  • Unlike flutter-symbols (single mapping per app version), each PDB is correlated individually by debug ID, read from a build-time manifest (dd_debug_ids.json, generated by dd-sdk-maui, passed via --debug-id-manifest) rather than recomputed from the PDB itself — avoiding a risk of the uploader and the SDK's own ID computation diverging.
  • A PDB found on disk with no matching manifest entry is skipped with a warning rather than uploaded; an assembly name matching two manifest entries only by case is also rejected rather than silently picking one.
  • Backend acceptance of the dotnet_portable_pdb metadata type is tracked separately (RUM-18296) and is not part of this PR.

Test plan

  • Unit tests for manifest parsing/lookup (including ambiguous case-insensitive matches and empty-debug-id handling) and the upload flow

Uploads first-party/project assembly Portable PDBs, correlated by the
build-time debug ID manifest (dd_debug_ids.json) generated by
dd-sdk-maui, so managed exception stack traces can be symbolicated.
Modeled on the pe-symbols upload command; scoping to first-party
assemblies is left to the caller (the future RUM-18298 MSBuild wiring)
via which paths it passes in, not filtered by this command itself.
Name by symbol format (Portable PDB), not app framework, matching the
pe-symbols/elf-symbols/wasm-symbols/dsyms convention and the ppdb-over-maui
source_type precedent from RUM-18289 — the command only uploads pPDBs, so a
framework-named scope implied broader coverage than it has.
…ID handling

Two bugs caught by blind verification: manifest lookup was case-sensitive
with no fallback (risky given .NET/Windows case-insensitive assembly names),
and a falsy check on the debug ID treated a legitimately empty-string entry
as missing. Add lookupDebugId() with a case-insensitive fallback, and tests
for both fixes plus previously-uncovered paths (invalid symbols location,
non-.pdb file input, array/scalar manifest JSON, --disable-git).
…-symbols

lookupDebugId's case-insensitive fallback could silently pick whichever
key won by Object.keys iteration order when a manifest had two entries
differing only by case mapped to different debug IDs. Now such a
collision throws AmbiguousManifestEntryError, caught by the upload
command to skip the file with an explicit warning instead of silently
attaching the wrong debug ID.
@rodrigol-ddog
rodrigol-ddog requested a review from a team as a code owner September 4, 2026 15:03
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6b14c00 | Docs | View more details | Give us feedback!

@rodrigol-ddog rodrigol-ddog added the rum Related to [dsyms, flutter-symbols, react-native, sourcemaps, unity-symbols] label Sep 7, 2026
Add the missing eslint-disable header to cli.ts (flagged by
lint:packages) and register ppdb-symbols upload's required arguments
in cli.test.ts's fips-test harness, without which clipanion never
reaches execute() and the --fips tests fail with 0 enableFips calls.

@Drarig29 Drarig29 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.

Hi! Before I review, can your team review the code?

Please go through https://github.com/DataDog/datadog-ci/blob/master/CONTRIBUTING.md#things-to-update to add the codeowners, and other things to update

Addresses reviewer feedback on PR #2491 pointing at CONTRIBUTING.md's
checklist for new commands (CODEOWNERS entry, command README, root
README link).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rodrigol-ddog
rodrigol-ddog requested a review from a team as a code owner September 8, 2026 09:59
@rodrigol-ddog
rodrigol-ddog requested a review from a team September 8, 2026 10:01
@rodrigol-ddog

Copy link
Copy Markdown
Contributor Author

Thanks @Drarig29,

Updated CODEOWNERS and added a README in e12ca24

Review requested to my team.

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Datadog Autotest: FAIL

A manifest with two names that differ only by letter case can select one debug ID instead of reporting an error. A direct .PDB path also passes validation, but the command does not remove its extension and skips the valid symbol file.

Open Bits AI session

🤖 Datadog Autotest · Commit e12ca24 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Comment thread packages/base/src/commands/ppdb-symbols/manifest.ts Outdated
Comment thread packages/base/src/commands/ppdb-symbols/upload.ts Outdated
lookupDebugId's exact-case-match branch returned immediately without
running the case-insensitive collision check, so a manifest with two
case-variant keys mapping to different debug IDs could silently upload
under the wrong one. Removed the shortcut so all lookups go through the
same ambiguity check.

upload.ts hardcoded a lowercase '.pdb' suffix strip, so a directly-passed
file with an uppercase .PDB extension (explicitly accepted by
getPdbFiles) kept its extension in the computed assembly name and failed
manifest lookup. Now strips whatever extension the file actually has.

Found by Datadog Autotest on PR #2491.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread packages/base/src/commands/ppdb-symbols/README.md Outdated

@Drarig29 Drarig29 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.

LGTM! 🚀

Comment thread packages/datadog-ci/README.md
rodrigol-ddog and others added 3 commits September 10, 2026 11:20
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Aligns with the command cli.ts template updated in #2499.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rodrigol-ddog
rodrigol-ddog merged commit aac1572 into master Oct 5, 2026
35 checks passed
@rodrigol-ddog
rodrigol-ddog deleted the rodrigol-ddog/maui-ppdb-upload-command branch October 5, 2026 11:45
@Drarig29 Drarig29 mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rum Related to [dsyms, flutter-symbols, react-native, sourcemaps, unity-symbols]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants