Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pacmak): race condition in python packing when run over multiple …
…packages (#1783) The root cause seems to be that the async APIs in Node's fs modules isn't strictly single threaded. When packed over several packages, pacmak schedules these in parallel, creating a race condition on the local cache for Python Black. All threads thrash to try and set up the package directory and one of them fails. The fix is to introduce a process wide promise that awaits until the Python Black is fully set up. Testing Unit tests for such race conditions are hard to write correctly. This has been verified manually by running against 10 CDK packages at a time. I was able to confirm that the issue does show up consistently without this fix and the fix works correctly. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information