Stuck in "Uploading code" in multi-root workspace
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
Zipstream is throwing `Error: File already exists at ZipWriter.add` if writeFile is being called twice with the same path. `_numberOfFilesSucceeded` never reaches `_numberOfFilesToStream` so the user is stuck in "Uploading code" phase.
This affects /dev and /doc being run on a multi-root workspace with the same file paths in it multiple times.
I'm thinking that zipstream needs some sort of error handling mechanism to skip adding a file if theres a failure.
This bug was introduced in last weeks release (https://github.com/aws/aws-toolkit-vscode/commit/21c7f12132dc4cc72724e1946dc0ce1ea627edc0)
## Steps to reproduce the issue
1) Create a multi root workspace in vs code that has the same file in it multiple times, for example:

2) Run /dev or /doc
## Expected behavior
## System details (run `AWS: About` and/or `Amazon Q: About`)
OS: Darwin arm64 23.6.0
Visual Studio Code extension host: 1.96.4
Amazon Q: 1.46.0
node: 20.18.1
electron: 32.2.6
Contributor guide
Research direction
Reproduce the multi-root workspace case with duplicate paths while running /dev or /doc, then inspect zipstream's ZipWriter.add and the writeFile flow. Done means a duplicate-path failure no longer leaves the user stuck in the "Uploading code" phase and the success count can complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100