Skip to content

Suppress MAR fallback noise in Save/Install and remove test-oriented information output#2014

Draft
SydneyhSmith with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-unneeded-logs-errors
Draft

Suppress MAR fallback noise in Save/Install and remove test-oriented information output#2014
SydneyhSmith with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-unneeded-logs-errors

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

When MAR is searched before other repositories, normal 404 Not Found responses for packages not present in MAR were being emitted as user-visible errors, even when a later repository could satisfy the request. In addition, container registry auth-path internals were emitting Information-stream messages used only by tests.

  • Container registry fallback error classification

    • Updated ContainerRegistryServerAPICalls.GetHttpResponseJObjectUsingDefaultHeaders(...) to classify ResourceNotFoundException as:
      • FullyQualifiedErrorId = "PackageNotFound"
      • ErrorCategory = ObjectNotFound
    • This aligns MAR 404 behavior with existing fallback logic so per-repository misses do not surface as misleading user errors during multi-repo search.
  • Removed test-only Information stream output

    • Replaced WriteInformation("Value of isRepositoryUnauthenticated: ...") with WriteDebug(...) in container registry auth flow.
    • Eliminates noisy Information output from normal cmdlet usage while preserving diagnosability via Debug stream.
  • Adjusted affected tests to match intended behavior

    • Updated publish/save/install tests that previously asserted MAR fallback noise or relied on Information-stream internals.
    • New expectations validate no extra error/info output for successful fallback scenarios.
catch (ResourceNotFoundException e)
{
    errRecord = new ErrorRecord(
        exception: e,
        "PackageNotFound",
        ErrorCategory.ObjectNotFound,
        _cmdletPassedIn);
}

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI linked an issue Jul 21, 2026 that may be closed by this pull request
3 tasks
Copilot AI changed the title [WIP] Fix multiple Cmdlets emitting unneeded logs and errors Suppress MAR fallback noise in Save/Install and remove test-oriented information output Jul 21, 2026
Copilot AI requested a review from SydneyhSmith July 21, 2026 18:33
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.

Multiple Cmdlets emits unneeded log/errors

2 participants