Repository navigation
Add release telemetry canary gate - #14727
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: a4176169-5c8c-4d93-bdf0-16f1a089978e
Co-authored-by: Copilot <[email protected]> Copilot-Session: a4176169-5c8c-4d93-bdf0-16f1a089978e
JanProvaznik
left a comment
There was a problem hiding this comment.
this is a good goal, but I don't think the change is complete and I'm doubtful it's achievable this way
The tables where we push telemetry have ~hours delay.
It tests only the VS path while to me the SDK is more interesting and we had also a recent regression due to how server and sdk client communicate.
how do you plan to validate this?
I am against putting it in official build as that introduces new network dependencies that may block it, it could be a stage of the internal CI that runs on main.
There was a problem hiding this comment.
Pull request overview
Adds a release-promotion telemetry “canary” to verify that an official vs* release candidate can emit a uniquely identifiable telemetry event and that it is successfully ingested end-to-end before publishing artifacts.
Changes:
- Emit a
VS/MSBuild/ReleaseCanaryevent (keyed byMSBUILD_TELEMETRY_CANARY_ID) immediately before telemetry disposal in full-framework MSBuild. - Add
eng/validate-telemetry-canary.ps1(+ companion PowerShell tests) to execute the exactMicrosoft.Build.Runtimenet472MSBuild and poll Azure Data Explorer for canary ingestion. - Add a
Release Telemetry Canarypipeline stage forvs*official builds and make post-build validation depend on it, with a manual-only override switch documented in the release checklist.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MSBuild/XMake.cs | Emits the release canary before telemetry disposal at process exit. |
| src/Framework/Telemetry/TelemetryManager.cs | Adds canary env var constant and posting logic for VS telemetry sessions. |
| src/Framework/Telemetry/TelemetryConstants.cs | Defines the ReleaseCanary event name constant. |
| src/Framework.UnitTests/TelemetryManager_Tests.cs | Adds unit test validating canary property shape/identity. |
| eng/validate-telemetry-canary.ps1 | New canary validator: extracts runtime package MSBuild.exe, runs it, and polls ADX. |
| eng/validate-telemetry-canary.Tests.ps1 | New lightweight PowerShell tests for validator helpers and YAML override structure. |
| .vsts-dotnet.yml | Adds the Release Telemetry Canary stage + manual override parameterization and dependency wiring. |
| documentation/release-checklist.md | Requires a successful canary (or documented manual override) for release selection. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
@JanProvaznik You are right, if the telemetry takes hours, this approach is not good. What if we split this in a way. There would be an internal prerelease pipeline that would run the exact candidate, emit the canary and validate that telemetry was generated? Then, the build promotion task would only query it and block promotion if it is missing. |
|
In my head, we'd have "we have some data from recent canary builds" on the release checklist around canary->insiders promotion time, and likewise "there's some data from the final/insiders build" around GA time. The delay shouldn't matter for that. Does that sound reasonable? |
Co-authored-by: Copilot App <[email protected]>
🔍 Skill Validator Results
Summary
Full validator output```text Found 1 skill(s) [release] 📊 release: 4,590 BPE tokens [chars/4: 4,469] (standard ~), 14 sections, 1 code blocks [release] ⚠ Skill is 4,590 BPE tokens (chars/4 estimate: 4,469) — approaching "comprehensive" range where gains diminish. ✅ All checks passed (1 skill(s)) ``` |
Co-authored-by: Copilot App <[email protected]>
Fixes #14714
Context
Telemetry initialization and disposal are best effort, so a release candidate can complete successfully even when end-to-end telemetry ingestion is broken. This adds a release-promotion gate that executes the produced candidate and verifies a uniquely identifiable event reaches the telemetry backend.
Changes Made
MSBUILD_TELEMETRY_CANARY_IDsupport that postsVS/MSBuild/ReleaseCanarythrough the existing full-framework telemetry session immediately before normal disposal.eng/validate-telemetry-canary.ps1to extract the exactMicrosoft.Build.Runtimepackage, execute itsnet472MSBuild.exe, and poll a configured Azure Data Explorer function for the canary.Release Telemetry Canarystage forvs*official builds and made Arcade post-build publication depend on it.allowTelemetryCanaryFailureoverride that removes the backend-dependent tasks from an overridden run.documentation/release-checklist.mdto require a successful canary for the official build selected for release.Testing
build.cmd -v quiet: 0 warnings, 0 errors.src/MSBuild/MSBuild.csproj: 0 warnings, 0 errors.TelemetryManager_Teststhrough the direct Microsoft.Testing.Platform host: 4 passed, 0 failed, 0 skipped.eng/validate-telemetry-canary.Tests.ps1: passed..vsts-dotnet.yml,eng/validate-telemetry-canary.ps1, andeng/validate-telemetry-canary.Tests.ps1successfully.Notes
TelemetryCanaryClusterUri,TelemetryCanaryDatabase, andTelemetryCanaryQueryFunction.Darc: Maestro Productionservice connection must have query access to the configured Azure Data Explorer database, ortelemetryCanaryAzureServiceConnectionmust be set to another compile-time-authorized connection.VS/MSBuild/ReleaseCanaryat 100% so the gate does not depend on normal telemetry sampling.