-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Suppress advertising manifest messages unless verbosity is diagnostic #51560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/10.0.2xx
Are you sure you want to change the base?
Conversation
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
|
@copilot on unsigned .NET versions, we also have a message we include for each manifest which is more than we probably want. I think it's still worth saying it once. Can you reduce the number of times this message is sent to be only once? |
|
Testing done: The message only shows up in manifest mode. Confirmed that with this change, I no longer see it but if I do -v:diag, I will still get the messages as expected. |
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 <12663534+marcpopMSFT@users.noreply.github.com>
Fixed in commit b564f6b. Changed the |
Summary: Suppress Advertising Manifest Messages
This PR fixes the issue where advertising manifest messages are displayed during workload install operations. According to the requirements, these messages should only appear when verbosity is set to diagnostic (diag).
What was the problem?
Users were seeing these messages during normal workload install operations:
These messages were being displayed even at normal verbosity levels, which cluttered the output.
Additionally, on unsigned .NET versions, the message "Skipping NuGet package signature verification." was appearing multiple times (once per NuGetPackageDownloader instance).
What changed?
IsDiagnostic()extension method - Returns true only fordiagnosticordiagverbosity levels_displayManifestUpdatesflagIsDiagnostic()instead ofIsDetailedOrDiagnostic()when creating WorkloadManifestUpdater instances_validationMessagesDisplayedflag to static in NuGetPackageDownloader to ensure the message appears only once globallyVerification:
✅ All 23 WorkloadManifestUpdater tests pass
✅ All 43 WorkloadInstall tests pass (1 pre-existing failure unrelated to this change)
✅ Code review completed with all feedback addressed
✅ CodeQL security scan passed
✅ Build succeeds
Files Modified:
src/Cli/dotnet/Extensions/CommonOptionsExtensions.cs- Added IsDiagnostic() methodsrc/Cli/dotnet/Commands/Workload/Install/WorkloadManifestUpdater.cs- Guarded error messagessrc/Cli/dotnet/Commands/Workload/Install/WorkloadInstallCommand.cs- Changed to IsDiagnostic()src/Cli/dotnet/Commands/Workload/Update/WorkloadUpdateCommand.cs- Changed to IsDiagnostic()src/Cli/dotnet/Commands/Workload/List/WorkloadListCommand.cs- Changed to IsDiagnostic()src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs- Made validation message flag statictest/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs- Updated teststest/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs- Updated testsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.