Repository navigation
Suppress advertising manifest messages unless verbosity is diagnostic - #55276
Conversation
Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: marcpopMSFT <[email protected]>
Co-authored-by: marcpopMSFT <[email protected]>
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: 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 fix the failed build: I believe it should be TestAssetsManager instead. |
|
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 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]>
Confirmed — making |
|
@copilot resolve the merge conflicts in this pull request |
…ges to the new partial class structure Co-authored-by: marcpopMSFT <[email protected]>
…al class refactoring Co-authored-by: marcpopMSFT <[email protected]>
Resolved in the latest commit.
|
|
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. |
There was a problem hiding this comment.
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 workloadinstall,update, andlistto gate advertising-manifest messaging on diagnostic verbosity only. - Guarded advertising-manifest “package does not exist” / “failed to update” messages behind a
displayManifestUpdatesflag. - 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. |
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 26385f69-d7e4-4ac0-b154-7d6001e96557
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 26385f69-d7e4-4ac0-b154-7d6001e96557
Port of the first 5 commits from #51560 (targeting
release/10.0.4xx) ontomain, without the accumulated merge commits.Changes
WorkloadManifestUpdater— adds adisplayManifestUpdatesbool parameter; advertising manifest messages (e.g.AdManifestPackageDoesNotExist) are only emitted whentrueinstall,update,list) — passdisplayManifestUpdatesbased on whether verbosity isdiagnostic; all other verbosity levels suppress these messagesCommonOptionsExtensions— addsIsDiagnostic()extension onVerbosityOptionsNuGetPackageDownloader— makes_validationMessagesDisplayedstaticso "Skipping NuGet package signature verification." appears at most once per process, not once per downloader instanceItSuppressesMessagesWhenDisplayManifestUpdatesIsFalse; updatedHideManifestUpdatesWhenVerbosityIsMinimalOrNormalto include--verbosity:detailed; renamedShowManifestUpdatesWhenVerbosityIsDetailedOrDiagnostic→ShowManifestUpdatesWhenVerbosityIsDiagnosticwith only thediagnosticdata rowConflicts resolved during cherry-pick:
usingdirectives inCommonOptionsExtensions.cs(main had added three additional usings post-branch); xUnit[Fact]/[Theory]/[InlineData]test attributes converted to MSTest equivalents.