Skip to content

feat(compat): add Azure inventory payload core - #175

Open
nina9753 wants to merge 10 commits into
mainfrom
nina.rei/SVLS-9604/compat-inventory-azure
Open

nina9753 wants to merge 10 commits into
mainfrom
nina.rei/SVLS-9604/compat-inventory-azure

Conversation

@nina9753

@nina9753 nina9753 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add the reusable serverless compatibility inventory crate and payload builder
  • collect canonical Azure Functions identity, slot, runtime, and subscription metadata
  • keep scheduling and transport out of this foundational slice

Stack

  1. feat(compat): add Azure inventory payload core #175 — Azure identity and core payload (this PR)
  2. feat(compat): add GCP inventory collection #176 — GCP inventory collection, based on this PR
  3. feat(compat): add serverless-compat inventory reporter (SVLS-9604) #161 — reporter, transport, and compat integration

#176 targets this PR branch. #161 is based on #176 and remains the top, end-to-end-testable PR, preserving its original URL, comments, and review history. Release workflow/version embedding and reporter enablement are delivered in #161.

Testing

  • cargo test --package datadog-serverless-compat-inventory --locked --offline
  • cargo clippy --package datadog-serverless-compat-inventory --all-targets --locked --offline -- -D warnings
  • rustfmt --edition 2024 --check on all new Rust sources
  • git diff --check

Copilot AI balanced review requested due to automatic review settings September 29, 2026 13:45
@nina9753
nina9753 requested review from a team as code owners September 29, 2026 13:45
@nina9753
nina9753 requested review from apiarian-datadog and shreyamalpani and removed request for a team September 29, 2026 13:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T02:36:37.128342Z d0286aa New commits
🔒 Security Review ✅ Completed 2026-11-02T02:36:25.888055Z d0286aa New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Unsafe test environment mutation, missing override coverage, and the unrelated TLS downgrade should be addressed.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Adds the foundational Azure Functions inventory payload crate for Serverless Compat.

Changes:

  • Collects canonical Azure identity, slot, runtime, region, and subscription metadata.
  • Builds serialized Fleet Automation inventory payloads.
  • Adds focused Azure and payload tests.
File Description
src/​platform/​mod.rs Dispatches platform metadata collection.
src/​platform/​azure.rs Collects Azure Functions metadata and identity.
src/​payload.rs Constructs serialized inventory payloads.
src/​lib.rs Exposes the inventory report API.
Cargo.toml Defines the new crate and dependencies.
Cargo.lock Registers the crate and changes rustls.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd00914fa7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@apiarian-datadog apiarian-datadog 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.

looks pretty good to me, tho i'd defer to folks more familiar with serverless compat for an ultimate review.

@nina9753
nina9753 added this pull request to stack #177 October 5, 2026 20:05
@nina9753
nina9753 requested a review from duncanpharvey October 5, 2026 20:52
Comment thread crates/inventory/src/payload.rs Resolved
Comment thread crates/inventory/src/platform/azure.rs Outdated
Comment on lines +32 to +41
// These values are inventory-specific enrichments that are not exposed by
// the published libdd-common 5.2 API used by this repository.
let region = env
.get_var("REGION_NAME")
.map(|value| value.trim().to_string())
.filter(|value| !value.is_empty());
let deployment_slot = env
.get_var("WEBSITE_SLOT_NAME")
.map(|value| value.trim().to_string())
.filter(|value| !value.is_empty() && !value.eq_ignore_ascii_case("production"));

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 see that the libdatadog changes were merged. Are you able to do a libdatadog release for those changes so they can be applied in this PR?

DataDog/libdatadog#2629

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

DataDog/libdatadog#2629 is merged on main, but I have not found a published libdd-common release containing it yet. This PR still uses the local region and slot handling. Once the release is available, I can update inventory to consume the shared helpers. Leaving this open until that dependency update lands.

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 merged updates to libdatadog crates today in #196. Can you rebase?

@nina9753
nina9753 force-pushed the nina.rei/SVLS-9604/compat-inventory-azure branch from 90f9d1e to 6c46ed0 Compare October 16, 2026 20:05
@nina9753
nina9753 force-pushed the nina.rei/SVLS-9604/compat-inventory-azure branch from 73de443 to d0286aa Compare November 2, 2026 02:32

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0286aaaee

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

report_reason,
platform,
&ProcessEnv,
option_env!("DD_SERVERLESS_COMPAT_BINARY_VERSION"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Embed the binary version in release builds

When artifacts are built by the repository's publish or release workflows, this compile-time variable is never defined: the current build-datadog-serverless-compat.yml accepts only runner, while publish.yml resolves the version only after downloading the binaries. Consequently option_env! is always None for official artifacts and every report omits serverless_compat_binary_version. Fresh evidence against the earlier thread's claim is that neither current workflow sets or forwards the renamed DD_SERVERLESS_COMPAT_BINARY_VERSION; pass the resolved version into the reusable build and export it for each cargo build.

AGENTS.md reference: AGENTS.md:L24-L31

Useful? React with 👍 / 👎.

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.

5 participants