Add --report-azdo-groups/--report-azdo-annotations on|off toggles#9542
Merged
Conversation
The AzureDevOpsReport extension's per-assembly log groups and failure annotations were always on once --report-azdo was set, with no way to disable them individually. Add two additive on|off knobs (default on) mirroring the GitHubActionsReport scheme so each feature can be turned off without affecting the rest of the extension. - Add IsFeatureKnobEnabled helper and gate the log-group and annotation reporters on their knob. - Register the options with on|off validation and requires-'--report-azdo' checks, consistent with the existing sub-options. - Add resources (regenerated xlf for all locales) and update the help/info acceptance expectations. - Add unit tests for validation, the toggle helper, and log-group gating. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds per-feature on|off toggles to the Azure DevOps report extension so log groups and failure annotations can be disabled independently while keeping the overall --report-azdo behavior unchanged by default (both features default to on).
Changes:
- Introduced
--report-azdo-groups on|offand--report-azdo-annotations on|offwith validation and “requires--report-azdo” enforcement. - Gated
AzureDevOpsLogGroupReporterandAzureDevOpsReporterenablement on the corresponding feature knob. - Updated localized resources (
.resx+ regenerated.xlffiles), help/info acceptance expectations, and added unit tests for validation + gating + knob helper semantics.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLogGroupReporterTests.cs | Adds unit coverage for groups knob gating and updates helper to inject the new option. |
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsConstantsTests.cs | Adds unit coverage for the shared IsFeatureKnobEnabled helper behavior. |
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs | Adds unit coverage for requires---report-azdo validation and on/off argument validation. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs | Updates --help/--info expectations to include the new CLI options and their descriptions/arity. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hant.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hans.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.tr.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ru.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pt-BR.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pl.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ko.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ja.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.it.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.fr.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.es.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.de.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.cs.xlf | Regenerated localization entries for new option text and validation strings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx | Adds new option description strings and an invalid on/off value validation string. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs | Gates failure-annotation reporting on the annotations knob (in addition to existing activation checks). |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsLogGroupReporter.cs | Gates per-assembly log grouping on the groups knob (in addition to existing activation checks). |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsConstants.cs | Adds IsFeatureKnobEnabled helper implementing “enabled unless explicitly off”. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs | Registers new options and validates `on |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs | Adds option-name constants and shared on/off literals. |
Review details
- Files reviewed: 23/23 changed files
- Comments generated: 0
- Review effort level: Low
0101
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Microsoft.Testing.Extensions.AzureDevOpsReportextension's per-assembly log groups and failure annotations were unconditionally on once--report-azdowas set (on an Azure DevOps agent), with no way to disable them individually. This adds two additiveon|offknobs (defaulton), mirroring theGitHubActionsReportper-feature toggle scheme, so each feature can be turned off without affecting the rest of the extension.This is a non-breaking, additive change: the new options don't exist today, and every feature still defaults to
on, so existing behavior is unchanged.New options
--report-azdo-groups on|off--report-azdo-annotations on|off##vso[task.logissue])Both require
--report-azdoand only take effect on an Azure DevOps agent (TF_BUILD=true), consistent with the extension's existing activation model.Changes
AzureDevOpsConstants.IsFeatureKnobEnabled— shared helper (mirrorsGitHubActionsFeature.IsKnobEnabled): a knob is enabled unless explicitly set tooff.AzureDevOpsLogGroupReporter.IsEnabledAsyncon the groups knob andAzureDevOpsReporter.IsEnabledAsyncon the annotations knob.on|offargument validation and requires---report-azdochecks, consistent with the existing sub-options..resxstrings and regenerated the.xlffiles for all locales viaUpdateXlf.--help/--infoexpectations inHelpInfoAllExtensionsTests.Context
This came out of a review of #9541 (the new GitHubActionsReport extension). GH ships uniform
--report-gh-<feature> on|offknobs from day one; AzDO lacked any off switch for its always-on features. This closes that gap for the two boolean features while intentionally leaving the genuinely multi-valued options (--report-azdo-upload-artifactsmode,--report-azdo-summarypath, publish flags) as-is.Testing
HelpInfoAllExtensionsTestsis an acceptance test that requiresbuild.cmd -packto run end-to-end; its expectations were updated to exactly match the resx text and arity and should be confirmed in CI.