Skip to content

chore: exclude stacktrace C extension's new location - #875

Open
emmettbutler wants to merge 1 commit into
mainfrom
emmett.butler/strip-stacktrace-ext
Open

emmettbutler wants to merge 1 commit into
mainfrom
emmett.butler/strip-stacktrace-ext

Conversation

@emmettbutler

Copy link
Copy Markdown
Contributor

dd-trace-py is moving its stacktrace C extension, which only IAST uses, from ddtrace/appsec/_shared/ to ddtrace/internal/security/. The layer already strips ddtrace/appsec/_shared for this reason. The new directory also contains modules AAP imports at startup, so only the compiled extension is removed, not the whole directory.

The existing ddtrace/appsec/_shared entry is kept so the layer still strips the extension from ddtrace versions released before the move. rm -rf ignores whichever path doesn't exist, so this works with both old and new ddtrace versions, and the merge order relative to the dd-trace-py change doesn't matter.

Testing Guidelines

The extension isn't imported at serverless startup; dd-trace-py's tests/internal/test_serverless.py asserts this at its new module path.

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future

🤖 Generated with Claude Code

  strip relocated ddtrace stacktrace extension from layer
@emmettbutler
emmettbutler requested review from a team as code owners October 21, 2026 18:01
@emmettbutler emmettbutler changed the title chore: chore: exclude stacktrace C extension's new location Oct 21, 2026

@datadog-prod-us1-3 datadog-prod-us1-3 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 removal glob targets the relocated compiled extension while preserving the security modules needed at startup. The retained legacy path also covers older ddtrace layouts; no reportable defect was identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e2c2dff

@rithikanarayan

rithikanarayan commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@emmettbutler I am currently doing a release for this layer, please don't merge this until at least tomorrow afternoon (assuming this ddtrace change is going out in 4.17 or later, if it's already out pls let me know asap and I'll pause the release) 🙏

@rithikanarayan rithikanarayan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

blocking til release is done, dm if the comment about ddtrace version this responds to is relevant

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

DataDog/datadog-lambda-python | e2e-test-status — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

ℹ️ Info

🔄 Datadog auto-retried 1 job - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants