-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: auto-pin race condition on go.mod file (#521)
When using `-toolexec` mode, the auto-pin process may be initiated by multiple concurrent executions of the `toolexec` proxy. In such cases, there is a race condition on access to `go.mod` and `orchestrion.tool.go`, which often results in `go mod tidy` failing due to it detecting concurrent modifications of the `go.mod` (it may also result in corrupt content of the `orchestrion.tool.go` file). This addresses the issue by having the auto-pin process acquire an advisory write lock on the `go.mod` file, making sure all attempts are properly synchronized, and only one attempt tries to modify the file at a time. Fixes #491
- Loading branch information
1 parent
020b6fe
commit 5024673
Showing
5 changed files
with
62 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters