Skip to content

Commit 7a9dbe0

Browse files
eseligermrnugget
andauthored
Fix additional files being deleted prematurely (#468)
* Fix additional files being deleted prematurely When multiple containers use the same additional files, they could sometimes be deleted before the last container was done using them. Docker bind mount errors were happening then. This fixes it by taking the workspace path into account for the local file path, making it truly unique between workspace runs. * Update CHANGELOG.md Co-authored-by: Thorsten Ball <[email protected]>
1 parent b5497b6 commit 7a9dbe0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ All notable changes to `src-cli` are documented in this file.
1717

1818
### Fixed
1919

20+
- Workspaces could sometimes fail with docker bind mount errors, due to a race condition of multiple workspaces accessing the same auxilliary files. [#468](https://github.com/sourcegraph/src-cli/pull/468)
21+
2022
### Removed
2123

2224
## 3.24.5

internal/campaigns/repo_fetcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (rf *repoFetcher) zipFor(repo *graphql.Repository, workspacePath string) *r
9696
for _, component := range pathComponents {
9797
for _, name := range []string{".gitignore", ".gitattributes"} {
9898
filename := path.Join(currentPath, name)
99-
localPath := filepath.Join(rf.dir, repo.SlugForPath(filename))
99+
localPath := filepath.Join(rf.dir, repo.SlugForPath(workspacePath+filename))
100100

101101
zip.additionalFiles = append(zip.additionalFiles, &additionalFile{
102102
filename: filename,

0 commit comments

Comments
 (0)