Skip to content

Suppress advertising manifest messages unless verbosity is diagnostic - #55276

Merged
marcpopMSFT merged 11 commits into
mainfrom
copilot/grab-real-commits-for-main
Sep 9, 2026
Merged

marcpopMSFT merged 11 commits into
mainfrom
copilot/grab-real-commits-for-main

Conversation

Copilot AI commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Port of the first 5 commits from #51560 (targeting release/10.0.4xx) onto main, without the accumulated merge commits.

Changes

  • WorkloadManifestUpdater — adds a displayManifestUpdates bool parameter; advertising manifest messages (e.g. AdManifestPackageDoesNotExist) are only emitted when true
  • Workload commands (install, update, list) — pass displayManifestUpdates based on whether verbosity is diagnostic; all other verbosity levels suppress these messages
  • CommonOptionsExtensions — adds IsDiagnostic() extension on VerbosityOptions
  • NuGetPackageDownloader — makes _validationMessagesDisplayed static so "Skipping NuGet package signature verification." appears at most once per process, not once per downloader instance
  • Tests — new ItSuppressesMessagesWhenDisplayManifestUpdatesIsFalse; updated HideManifestUpdatesWhenVerbosityIsMinimalOrNormal to include --verbosity:detailed; renamed ShowManifestUpdatesWhenVerbosityIsDetailedOrDiagnostic → ShowManifestUpdatesWhenVerbosityIsDiagnostic with only the diagnostic data row

Conflicts resolved during cherry-pick: using directives in CommonOptionsExtensions.cs (main had added three additional usings post-branch); xUnit [Fact]/[Theory]/[InlineData] test attributes converted to MSTest equivalents.

Copilot AI and others added 5 commits July 14, 2026 18:59
Changed _validationMessagesDisplayed flag from instance-level to static to ensure
"Skipping NuGet package signature verification." message appears only once across
all NuGetPackageDownloader instances during workload operations, rather than once
per instance.

Co-authored-by: marcpopMSFT <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@marcpopMSFT

Copy link
Copy Markdown
Member

@copilot fix the failed build:
D:\a_work\1\s\test\dotnet.Tests\CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs(360,27): error CS0103: The name '_testAssetsManager' does not exist in the current context [D:\a_work\1\s\test\dotnet.Tests\dotnet.Tests.csproj]

I believe it should be TestAssetsManager instead.

@marcpopMSFT

Copy link
Copy Markdown
Member

Tested in codespace. Confirmed that we don't see the advertising manifest messages anymore in manifest mode unless diag verbosity is used.

…in ItSuppressesMessagesWhenDisplayManifestUpdatesIsFalse

Co-authored-by: marcpopMSFT <[email protected]>

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix the failed build:
D:\a_work\1\s\test\dotnet.Tests\CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs(360,27): error CS0103: The name '_testAssetsManager' does not exist in th...

Fixed in 617537c — changed _testAssetsManager to TestAssetsManager in the new test method.

@marcpopMSFT

Copy link
Copy Markdown
Member

@copilot The test GivenANonSignedSdkItShouldPrintMessageOnce failed as it expected to find GivenANonSignedSdkItShouldPrintMessageOnce in the output. Is that now suppressed because of this change? I don't think that was intentional as this change was only meant to change the advertising manifest messages.

…nSignedSdkItShouldPrintMessageOnce test

Co-authored-by: marcpopMSFT <[email protected]>

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The test GivenANonSignedSdkItShouldPrintMessageOnce failed as it expected to find GivenANonSignedSdkItShouldPrintMessageOnce in the output. Is that now suppressed because of this change? I do...

Confirmed — making _validationMessagesDisplayed static caused the test to fail because the flag persisted across NuGetPackageDownloader instances within the same test process. Reverted it back to an instance field in the latest commit.

@marcpopMSFT

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits July 29, 2026 00:18
…ges to the new partial class structure

Co-authored-by: marcpopMSFT <[email protected]>

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved in the latest commit. origin/main had refactored WorkloadManifestUpdater into a partial class and extracted the advertising manifest logic into a new WorkloadAdvertisingManifestUpdater class. The resolution:

  1. WorkloadManifestUpdater.cs — accepted origin/main's version (the partial class with shared static methods only; the conflict was the entire class body which had been moved to WorkloadManifestUpdater.Managed.cs and WorkloadAdvertisingManifestUpdater.cs)
  2. WorkloadAdvertisingManifestUpdater.cs — applied the _displayManifestUpdates guards to the two messages that origin/main had left unguarded: FailedAdManifestUpdate (in the catch block) and AdManifestPackageDoesNotExist (in UpdateAdvertisingManifestAsync). The AdManifestUpdated guard was already present.

@marcpopMSFT
marcpopMSFT marked this pull request as ready for review July 29, 2026 23:26
@marcpopMSFT
marcpopMSFT requested a review from a team as a code owner July 29, 2026 23:26
Copilot AI review requested due to automatic review settings July 29, 2026 23:26
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

This PR changes workload command output so “advertising manifest” update messages are suppressed by default and only shown when --verbosity:diagnostic is used, reducing noise in normal workload operations.

Changes:

  • Added VerbosityOptions.IsDiagnostic() and updated workload install, update, and list to gate advertising-manifest messaging on diagnostic verbosity only.
  • Guarded advertising-manifest “package does not exist” / “failed to update” messages behind a displayManifestUpdates flag.
  • Updated/added tests to reflect the new verbosity gating behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs Adds a regression test ensuring advertising-manifest messages are suppressed when displayManifestUpdates is false.
test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs Updates verbosity data rows and renames the diagnostic-only test.
src/Cli/dotnet/Extensions/CommonOptionsExtensions.cs Adds VerbosityOptions.IsDiagnostic() helper.
src/Cli/dotnet/Commands/Workload/Update/WorkloadUpdateCommand.cs Passes displayManifestUpdates based on diagnostic verbosity.
src/Cli/dotnet/Commands/Workload/List/WorkloadListCommand.cs Passes displayManifestUpdates based on diagnostic verbosity.
src/Cli/dotnet/Commands/Workload/Install/WorkloadInstallCommand.cs Passes displayManifestUpdates based on diagnostic verbosity.
src/Cli/dotnet/Commands/Workload/Install/WorkloadAdvertisingManifestUpdater.cs Suppresses advertising-manifest error/absence messages unless displayManifestUpdates is true.

@marcpopMSFT
marcpopMSFT requested a review from nagilson July 30, 2026 23:41
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 26385f69-d7e4-4ac0-b154-7d6001e96557
@marcpopMSFT
marcpopMSFT enabled auto-merge (squash) July 30, 2026 23:41
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 26385f69-d7e4-4ac0-b154-7d6001e96557
@marcpopMSFT
marcpopMSFT requested a review from a team as a code owner September 9, 2026 00:36
@marcpopMSFT
marcpopMSFT merged commit 469d401 into main Sep 9, 2026
25 checks passed
@marcpopMSFT
marcpopMSFT deleted the copilot/grab-real-commits-for-main branch September 9, 2026 21:10
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 10, 2026
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.

4 participants