Skip to content

Announce when the tool is waiting for interactive input#1226

Closed
ramonsmits wants to merge 1 commit into
mainfrom
announce-awaiting-input
Closed

Announce when the tool is waiting for interactive input#1226
ramonsmits wants to merge 1 commit into
mainfrom
announce-awaiting-input

Conversation

@ramonsmits

Copy link
Copy Markdown
Member

Problem

The tool blocks on Console.ReadLine / Console.ReadKey at three interactive points:

  • the customer name prompt (BaseCommand), when --customerName isn't supplied;
  • the "Do you wish to proceed?" confirmation (Out.Confirm), when --unattended isn't supplied;
  • HTTP/RabbitMQ credentials (InteractiveHttpAuth).

On a seemingly-frozen console this is easily mistaken for a hang. The customer-name prompt is the first interactive point after the version check, so a run that's simply waiting for a name looks identical to one that's stuck. This came up in support case 00106424, where the console output ended right at that prompt and the tool was reported as "hanging indefinitely".

Change

Add Out.WriteAwaitingInput(string message) — a highlighted (cyan) notice printed immediately before each blocking prompt — and call it at the three sites above. The customer-name message also points at the flags that avoid the prompt in automated/locked-down environments (--customerName, --unattended).

No behavior change beyond the extra notice; prompts and reads are unchanged.

Before / after (customer-name prompt)

Before — silent after the version line, then blocks:

Particular.EndpointThroughputCounter 1.34.0 (Sha:...)
Skipping current version check. Please ensure you are not using an outdated version.

Enter customer name:

After:

Particular.EndpointThroughputCounter 1.34.1-... (Sha:...)
Skipping current version check. Please ensure you are not using an outdated version.

Waiting for input: a customer name is required for the report. Type it and press Enter. To skip this prompt, pass --customerName "<name>"; add --unattended for fully non-interactive (CI/automation) runs.
Enter customer name:

With --customerName "..." --unattended, no prompt (and no notice) is shown, as before.

Verification

  • dotnet build -c Release — 0 warnings, 0 errors (warnings-as-errors + analyzers).
  • Ran the built tool with and without --customerName/--unattended and confirmed the notice appears only when a prompt will actually block.

The tool blocks on Console.ReadLine/ReadKey for the customer name, the
"Do you wish to proceed?" confirmation, and HTTP (RabbitMQ) credentials.
On a seemingly-frozen console this is easily mistaken for a hang -
especially the customer-name prompt, which is the first thing after the
version check and is where support case 00106424's run appeared to stall.

Add Out.WriteAwaitingInput(...) to print a clear, highlighted notice at
each blocking prompt, and point users at --customerName / --unattended so
they can avoid the customer-name prompt entirely in automated or
locked-down environments.
@ramonsmits ramonsmits changed the title ✨ Announce when the tool is waiting for interactive input Announce when the tool is waiting for interactive input Jul 10, 2026
@ramonsmits ramonsmits closed this Jul 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.

1 participant