Skip to content

Specification: Parallel Installation#6295

Draft
denelon wants to merge 2 commits into
microsoft:masterfrom
denelon:spec/parallel-installation
Draft

Specification: Parallel Installation#6295
denelon wants to merge 2 commits into
microsoft:masterfrom
denelon:spec/parallel-installation

Conversation

@denelon

@denelon denelon commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Specification for parallel package installation in multi-package operations. When more than one package is being installed or upgraded — including winget upgrade --all, winget import, and winget configure flows — packages are scheduled across parallel and serialized execution lanes based on installer type safety:

  • MSIX: concurrent (up to 6, platform limit)
  • Inno/NSIS/Portable/ZIP: concurrent (safe, no shared state)
  • MSI/Burn/EXE: serialized (respects _MSIExecute mutex)

Includes download-ahead scheduling, retry on mutex contention, dependency-aware ordering, and SafeForParallel manifest field for opt-in EXE parallelism.

Authored with GitHub Copilot assistance.

🔗 References

Related Issues:

🔍 Validation

Spec document — no code changes to validate.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Specification for parallel package installation across multi-package
operations (upgrade --all, import, configure). MSIX concurrent,
MSI serialized, download-ahead scheduling with retry logic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- **Distributed installation** — For fleet management, schedule package downloads during off-peak hours and install during maintenance windows
- **Resume on reboot** — If a reboot interrupts a batch, resume remaining packages after restart

## Resources

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should also consider

```

> [!IMPORTANT]
> Downloads and MSIX installations can overlap — an MSIX install can begin as soon as its download completes, even while other downloads are still in progress. The serialized queue also starts as soon as its first package finishes downloading. The phases are logical, not strictly sequential.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this limited just to MSIX install overlap? Couldn't downloads overlap with any install?

- Architecture: x64
InstallerType: exe
InstallerUrl: https://example.com/app-setup.exe
SafeForParallel: true # Declares this installer is safe for concurrent execution

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How is this validated on package submission? Just because a user declares it does not mean it is true - especially in the case where two EXEs could be trying to write to the same resources if they are not MSI-backed


| Setting | Default | Min | Max | Description |
|---------|---------|-----|-----|-------------|
| `maxConcurrentDownloads` | 5 | 1 | 20 | Parallel downloads |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any setting for no limit? 0?


### Schema Version

Requires manifest schema version 1.29.0 for the `SafeForParallel` field. Parallel installation itself does not require schema changes — it works with existing manifests using installer type classification.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove version specfic information

### Validation Pipeline Impact

- `SafeForParallel` is a new optional boolean field on installer entries
- Validation: if `InstallerType` is `msi` or `burn` and `SafeForParallel: true`, reject as invalid (these types are inherently unsafe for parallel execution)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or wix

### Validation Pipeline Impact

- `SafeForParallel` is a new optional boolean field on installer entries
- Validation: if `InstallerType` is `msi` or `burn` and `SafeForParallel: true`, reject as invalid (these types are inherently unsafe for parallel execution)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Needs to consider the effective installer type, not declared installer type to appropriately handle packages in Zip files

- Progress display uses text status markers (✓ ● ○ ✗) alongside descriptions for screen readers
- Non-VT fallback ensures full accessibility without virtual terminal sequences
- JSON output mode (`--output json`) provides machine-readable progress events
- Summary line always includes text count (not just visual indicators)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to ensure redirected output is captured properly with no contamination


## Abstract

Enable parallel package installation in WinGet when multiple packages are being installed or upgraded simultaneously. This applies to `winget install` with multiple packages, `winget upgrade --all`, `winget import`, and `winget configure` flows. Packages are classified by installer type safety: MSIX packages can be installed concurrently (up to a configurable limit), while MSI/EXE packages that rely on the Windows Installer mutex are serialized. A dependency-aware scheduler maximizes throughput while respecting installer constraints.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this also affect winget download with multiple packages being able to be downloaded in parallel?

Win32 installers (including Inno, NSIS, portable) offer no platform-level
parallel guarantees. Only MSIX has concurrent deployment support from
the platform. All non-MSIX installers now use the serialized queue.

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