Skip to content

{CI} Submit resolved CLI runtime dependencies to Component Governance - #34490

Open
Naga Nandyala (naga-nandyala) wants to merge 2 commits into
Azure:devfrom
naga-nandyala:ci/cg-runtime-inventory
Open

Naga Nandyala (naga-nandyala) wants to merge 2 commits into
Azure:devfrom
naga-nandyala:ci/cg-runtime-inventory

Conversation

@naga-nandyala

@naga-nandyala Naga Nandyala (naga-nandyala) commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests Suppressions
️✔️ None ️✔️ 130/130 ️✔️ None

Description
Generate a pip installation report while the Linux, macOS, and Windows requirements jobs install the checked-out CLI with their platform pins. Submit each report to Component Governance after the runtime checks succeed. This lets the detector use the versions pip resolved instead of relying on source-file discovery alone.

The new step runs on queued PR validations and existing dev and release builds. No packaging, signing, or branch triggers change. The inventory describes the runtime tested by CI, not the final installer.

Testing Guide

  • Validated YAML parsing, template wiring across all three jobs, shell/Python syntax, and unchanged triggers.
  • A Linux Python 3.14 pip dry run using the local package metadata resolved 156 distributions and produced the expected report.
  • On this fork PR, build 378870 used the pre-generated pip report on Linux (155 packages), macOS (155), and Windows (157). Each job logged Snapshot request submitted. These counts describe the runtime reports, not the entire scans.
  • Follow-up verification: confirm the resulting snapshots are visible in CG for the build and phase. Build 378870 predates the scan-path change; verify the inventory-only scan on the next PR build and on the next eligible dev and release runs.

History Notes
CI-only change; no customer-facing command changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

Pipeline owners still need to verify that hosted Component Governance consumes pre-generated pip reports and publishes snapshots on Linux, macOS, and Windows for PR, dev, and release runs.

No open issues 🎉

What changed in this PR

Adds resolved runtime dependency reporting to the three platform requirements jobs so Component Governance can use pip’s installation inventory rather than source-file discovery alone.

Changes:

  • Installs the checked-out CLI with platform pins and generates a pip report.
  • Submits the report after successful runtime checks on queued PR validations and existing dev and release builds.
  • Documents verification steps and clarifies that the inventory represents the tested runtime, not the final installer. Packaging, signing, and triggers remain unchanged.
File Description
scripts/​ci/​install_with_cg_report.py Installs local CLI packages with platform pins and generates the dependency report.
scripts/​ci/​dependency_check.sh Selects report-generating installation when enabled on Linux and macOS.
scripts/​ci/​dependency_check.bat Selects report-generating installation when enabled on Windows.
azure-pipelines.yml Enables reporting for eligible builds and wires submission into all three jobs.
.azure-pipelines/​templates/​submit-cli-inventory.yml Defines the conditional Component Governance submission task.
.azure-pipelines/​Agent.md Documents inventory scope and hosted verification steps.

Review effort: Balanced

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants