Skip to content

Add --report-azdo-groups/--report-azdo-annotations on|off toggles#9542

Merged
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/azdo-report-feature-toggles
Jul 1, 2026
Merged

Add --report-azdo-groups/--report-azdo-annotations on|off toggles#9542
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/azdo-report-feature-toggles

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

The Microsoft.Testing.Extensions.AzureDevOpsReport extension's per-assembly log groups and failure annotations were unconditionally on once --report-azdo was set (on an Azure DevOps agent), with no way to disable them individually. This adds two additive on|off knobs (default on), mirroring the GitHubActionsReport per-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

Option Description Default
--report-azdo-groups on|off Per-assembly Azure DevOps log groups on
--report-azdo-annotations on|off Azure DevOps failure annotations (##vso[task.logissue]) on

Both require --report-azdo and only take effect on an Azure DevOps agent (TF_BUILD=true), consistent with the extension's existing activation model.

Changes

  • AzureDevOpsConstants.IsFeatureKnobEnabled — shared helper (mirrors GitHubActionsFeature.IsKnobEnabled): a knob is enabled unless explicitly set to off.
  • Gated AzureDevOpsLogGroupReporter.IsEnabledAsync on the groups knob and AzureDevOpsReporter.IsEnabledAsync on the annotations knob.
  • Registered the two options with on|off argument validation and requires---report-azdo checks, consistent with the existing sub-options.
  • Added .resx strings and regenerated the .xlf files for all locales via UpdateXlf.
  • Updated the --help/--info expectations in HelpInfoAllExtensionsTests.
  • Added unit tests for the option validation, the toggle helper, and log-group gating.

Context

This came out of a review of #9541 (the new GitHubActionsReport extension). GH ships uniform --report-gh-<feature> on|off knobs 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-artifacts mode, --report-azdo-summary path, publish flags) as-is.

Testing

  • Built the extension and unit-test projects (0 errors).
  • All AzureDevOps unit tests pass, including the new validation/gating/helper tests.
  • Note: HelpInfoAllExtensionsTests is an acceptance test that requires build.cmd -pack to run end-to-end; its expectations were updated to exactly match the resx text and arity and should be confirmed in CI.

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>
Copilot AI review requested due to automatic review settings July 1, 2026 11:43

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.

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|off and --report-azdo-annotations on|off with validation and “requires --report-azdo” enforcement.
  • Gated AzureDevOpsLogGroupReporter and AzureDevOpsReporter enablement on the corresponding feature knob.
  • Updated localized resources (.resx + regenerated .xlf files), 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

@Evangelink Evangelink enabled auto-merge (squash) July 1, 2026 13:25
@Evangelink Evangelink merged commit 9f1ae77 into main Jul 1, 2026
33 of 35 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/azdo-report-feature-toggles branch July 1, 2026 13:30
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.

3 participants