Skip to content

Backport gzip I/O retry logic and redirected-input console guard to release/10.0.4xx#54400

Draft
Copilot wants to merge 2 commits into
release/10.0.4xxfrom
copilot/backport-gzip-change-again
Draft

Backport gzip I/O retry logic and redirected-input console guard to release/10.0.4xx#54400
Copilot wants to merge 2 commits into
release/10.0.4xxfrom
copilot/backport-gzip-change-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Two transient-failure paths from main (#53424) were missing from the servicing branch.

Changes

  • GZipCompress.cs — replaces bare try/catch with a bounded retry loop (3 attempts, 200ms × attempt backoff) that retries only IOException, covering transient file locks from antivirus/indexers on CI machines:

    catch (IOException) when (attempt < MaxRetries)
    {
        Log.LogMessage(MessageImportance.Low,
            "Retrying compression of '{0}' (attempt {1}/{2}) due to transient I/O error.",
            file.ItemSpec, attempt, MaxRetries);
        Thread.Sleep(RetryDelayMs * attempt);
    }
  • PhysicalConsole.cs — gates ListenToConsoleKeyPressAsync() behind !Console.IsInputRedirected, preventing Console.ReadKey from blocking/throwing in redirected-stdin environments:

    if (testFlags.HasFlag(TestFlags.ReadKeyFromStdin))
        _ = ListenToStandardInputAsync();
    else if (!Console.IsInputRedirected)
        _ = ListenToConsoleKeyPressAsync();

Copilot AI and others added 2 commits May 20, 2026 22:11
@marcpopMSFT
Copy link
Copy Markdown
Member

@MichaelSimons per #54277, I asked copilot which changes from Matt's test stability PR to backport and it chose these two. 4xx doesn't require tactics so should be reasonable to backport. We'd have to consider risk more closely for a 1xx backport.

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.

2 participants