Skip to content

Add concurrent queues to necessary methods - #2064

Merged
alerickson merged 2 commits into
masterfrom
azBugFix
Oct 16, 2026
Merged

alerickson merged 2 commits into
masterfrom
azBugFix

Conversation

@alerickson

@alerickson alerickson commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

PR Summary

Resolves 2 bugs:

  1. Install-PSResource was failing with a "WriteObject and WriteError methods cannot be called" error because the new framework (TFM) and platform (RID) filtering in TryExtractToDirectory, GetBestLibFramework and WarnIfCrossLineageTfmSkipped wrote debug and warning messages directly from worker threads. These three methods have now been changed to add their messages to the existing warningMsgs and debugMsgs queues instead, and the pipeline thread writes them out after the parallel downloads finish.

  2. Install-PSResource was reinstalling dependencies that were already installed, a regression from the concurrent-install rewrite (v1.2.0 skipped them). On OneDrive-synced module folders, that reinstall copies the existing version to a temp backup first, which forced OneDrive to download cloud-only files and failed the install. DownloadParentAndDeps now skips dependencies whose exact version is already installed, unless -Reinstall, -TargetFramework or -RuntimeIdentifier is given.

PR Context

This resolves issue #2061

PR Checklist

@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The concurrency fix lacks regression coverage that exercises extraction on worker threads.

1 open finding
What changed in this PR

Routes platform-filtering diagnostics through thread-safe queues to prevent worker threads from writing directly to PowerShell streams.

Changes:

  • Passes warning/debug queues through extraction helpers.
  • Queues TFM/RID filtering diagnostics for pipeline-thread output.
File Description
src/​code/​InstallHelper.cs Replaces worker-thread Write* calls with queued messages.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/code/InstallHelper.cs
@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@alerickson
alerickson merged commit 8a2bf80 into master Oct 16, 2026
12 checks passed
@alerickson
alerickson deleted the azBugFix branch October 16, 2026 18:30
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.

3 participants