Skip to content

always print auth messages in TL, regardless of verbosity#11551

Merged
baronfel merged 3 commits intomainfrom
special-auth-messages
Jul 10, 2025
Merged

always print auth messages in TL, regardless of verbosity#11551
baronfel merged 3 commits intomainfrom
special-auth-messages

Conversation

@baronfel
Copy link
Copy Markdown
Member

@baronfel baronfel commented Mar 8, 2025

Part of dotnet/sdk#47602

Context

With NuGetInteractive=true being passed in more scenarios as of dotnet/sdk#47226, the default verbosity for dotnet run is now minimal for user-present scenarios - that's gross.

Changes Made

Broadly what I'm trying to do here is not require passing -v m to loggers to get the authentication-related messages. Right now dotnet run does this and it's quite noisy compared to previous behavior. This changed because recently I made the SDK start passing --interactive when the user is at the keyboard (similar logic to Terminal Logger's own enablement), and dotnet run has logic to force verbosity to minimal when that happens so that the auth messages print where a user can see them.

I kind of think of auth messages as messages that we should write regardless of verbosity (like errors are), so this is a step down that path for TL.

This change ensures that auth messages are always written in the TL experience, as immediate messages.

If this is accepted, then the SDK could remove the special case it currently has.

Testing

Updated snapshot baselines, manual testing.

Notes

@baronfel baronfel force-pushed the special-auth-messages branch from 7c7d9d8 to 26a168c Compare March 20, 2025 01:54
@baronfel baronfel marked this pull request as ready for review March 20, 2025 19:31
Comment thread src/Build/Logging/TerminalLogger/TerminalLogger.cs Outdated
Copy link
Copy Markdown
Member

@SimaTian SimaTian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, however this is probably worth looking into.

@ghost ghost assigned baronfel Jul 7, 2025
@baronfel baronfel force-pushed the special-auth-messages branch 2 times, most recently from a76d35c to 5df8560 Compare July 8, 2025 04:16
@baronfel baronfel force-pushed the special-auth-messages branch from 5df8560 to 1b23abc Compare July 8, 2025 04:17
@baronfel baronfel requested a review from SimaTian July 9, 2025 21:47
@baronfel
Copy link
Copy Markdown
Member Author

baronfel commented Jul 9, 2025

@SimaTian I finally got my brain to work and fixed the implementation to no longer lose those valuable warnings. Mind a re-review?

@baronfel baronfel enabled auto-merge July 9, 2025 22:05
@baronfel baronfel dismissed SimaTian’s stale review July 10, 2025 15:54

Change addressed

@baronfel baronfel merged commit f51a5b9 into main Jul 10, 2025
9 checks passed
@baronfel baronfel deleted the special-auth-messages branch July 10, 2025 15:58
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