microsoft / microsoft/amplifier

bug(windows): amplifier update fails with [WinError 5] Access is denied on module cache directories

Open
#241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
261
Avg merge
3h 28m
Merged PRs (30d)
13

Description

Description

amplifier update fails on Windows when clearing cached module directories. Every module cache entry fails to clear, and all bundle updates subsequently fail. Occurs on both normal updates and --force updates.

Error Output

Could not clear ...amplifier-module-context-simple-...: [WinError 5] Access is denied:
'...\.git\objects\pack\pack-....idx'
Could not clear ...amplifier-module-hooks-logging-...: [WinError 5] Access is denied: ...
... (repeats for all modules)

⚠ Update completed with errors
  ✗ Bundle: amplifier: [WinError 5] Access is denied: ...
  ✗ Bundle: browser-tester: [WinError 5] Access is denied: ...
  (all bundles fail)

Root Cause

Git pack files (.git/objects/pack/*.idx, .pack) are created read-only on Windows. Python's shutil.rmtree() does not handle read-only files on Windows.

Affected components:

  • amplifier-app-cli: cache_management.py, module_cache.py, reset.py, sources_compat.py
  • amplifier-foundation: sources/git.py (bundle cache clearing)

Fix

  • microsoft/amplifier-app-cli#152
  • microsoft/amplifier-foundation#137

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cache_management.py, module_cache.py, reset.py, and sources_compat.py in amplifier-app-cli, then inspect sources/git.py in amplifier-foundation. Run amplifier update and amplifier update --force on Windows to reproduce the read-only Git pack-file failures. Done means module and bundle caches clear successfully and both update modes complete without errors; the referenced PRs describe the existing fixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.