← Back to Pull requests

bazel: dd_cc_packaged: Introduce a new data attribute #58283

Closed
unknown closed this pull request without merging on Oct 21, 2026 17:39 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 13:43 UTC
Author

<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?

Introduce a new data & mode attributes, meant to replace the existing installed_files & installed_executables.
installed_files is fully removed, installed_executable is only deprecated for now.

The data attribute wasn't collecting pkg_files while advertising so. This is now fixed and allows us to replace installed_files with data.
Instead of guessing the file mode based on the versioning info (which usually works, but not for some of python's modules) we now provide a mode attribute that allows to enforce a given mode. If missing, the value is guess as it currently is, by assuming a binary with a version will denote a shared library, or an executable otherwise.

Motivation

Entries in installed_files and installed_executables are not walked by dd_collect_dependencies,
so their own dependencies are never collected, and installed_files cannot take a packaged library.
This blocks the native CPython build, where libpython must bring its extension modules, which
themselves depend on other libraries that need to end up in the packages.

These are runtime dependencies, for which data is the natural Bazel attribute, already walked by
the dd_collect_dependencies aspect.

The current API also forces executables to be attached to their library through
installed_executables, so packages depend on the library while what they install is the binary.
With data, curl and openscap now package their binaries separately, depending on the
library's package, which also removes their dependency cycle workarounds. The agent and heroku
packages depend on @curl//:curl_bin_pkg, the agent package on //deps/msodbcsql18:msodbcsql_pkg
directly, and pkg/compliance/cli on the openscap binaries' packages.

installed_executables remains for krb5, openssl and the current CPython build, until they move to
native Bazel builds. This is because the target we build there aren't regular cc_library. Since we will likely convert those to native bazel built libraries, handling them in this PR would be throwaway work.

Describe how you validated your changes

The list of installed files is equivalent before and after the change.

Also used to verify that with the migration of python to native bazel: https://github.com/DataDog/datadog-agent/pull/58194

Additional Notes

Diff: 316 lines (+237 / -79) across 3 files Reviewer: 0intro Review duration: 7436m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 316 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.345
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #58283"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.4% (MEDIUM) · Higher = larger blast radius
40.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.0% · Safe to merge
16.0%