Skip to content

Implement unimplemented concurrency methods for all server classes#2012

Open
alerickson wants to merge 11 commits into
masterfrom
concurrencyAllServers
Open

Implement unimplemented concurrency methods for all server classes#2012
alerickson wants to merge 11 commits into
masterfrom
concurrencyAllServers

Conversation

@alerickson

@alerickson alerickson commented Jun 30, 2026

Copy link
Copy Markdown
Member

PR Summary

This is a continuation of the concurrency work started in PR #1950. This PR adds concurrent/parallel execution support across all PSResourceGet server API classes by implementing the previously-stubbed async methods and broadening the API-version gating that selects the concurrent code path.

PR Context

PR Checklist

Copilot AI review requested due to automatic review settings June 30, 2026 21:00
@alerickson

Copy link
Copy Markdown
Member Author

/azp 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.

Pull request overview

This PR continues the concurrent install/find work by implementing previously-stubbed async methods across server API call classes and by broadening the gating so the concurrent code paths can be used for more repository types (beyond V2).

Changes:

  • Implemented Find*Async and InstallPackageAsync overrides for V3, NuGet server, local repo, and container registry server classes.
  • Added async install helpers for V3 (including async HTTP content fetch) to support parallel install workflows.
  • Expanded the concurrency gating in FindHelper and InstallHelper so parallelism can be used across more API versions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/code/V3ServerAPICalls.cs Implements async find/install methods and adds async install/HTTP helpers for V3 repositories.
src/code/NuGetServerAPICalls.cs Implements async wrappers for find/install methods for NuGet V2-style servers.
src/code/LocalServerApiCalls.cs Implements async find/install methods for local repository server.
src/code/InstallHelper.cs Broadens parallel install gating to apply regardless of repository API version.
src/code/FindHelper.cs Broadens parallel find/dependency gating and routes more paths through async methods.
src/code/ContainerRegistryServerAPICalls.cs Implements async wrappers for find/install methods for container registry server.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/code/FindHelper.cs
Comment thread src/code/FindHelper.cs
Comment thread src/code/FindHelper.cs Outdated
Comment thread src/code/FindHelper.cs Outdated
Comment thread src/code/FindHelper.cs
Comment thread src/code/InstallHelper.cs
Comment thread src/code/V3ServerAPICalls.cs
Comment thread src/code/NuGetServerAPICalls.cs
Comment thread src/code/ContainerRegistryServerAPICalls.cs Outdated
@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

InstallPackageAsync was calling the synchronous InstallPackage() which
writes to _cmdletPassedIn.WriteDebug, causing cross-thread cmdlet stream
writes when used from Parallel.ForEach.

- Refactor InstallPackageAsync to not call InstallPackage(); inline the
  null-version check and enqueue all messages via the provided queues
- Add a queue-aware InstallVersion overload that uses ConcurrentQueue
  parameters instead of _cmdletPassedIn.Write* calls, for use by the
  async install path
- Keep the original InstallVersion(out ErrorRecord) overload intact for
  the synchronous path
@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@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

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@alerickson alerickson changed the title WIP - Implement unimplemented concurrency methods for all server classes Implement unimplemented concurrency methods for all server classes Jul 1, 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.

3 participants