-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "text file busy" : Random conflict on parallel stack execution which use the same provider #2741
Comments
Similar issue except that in my case I'm developing in vscode and when vscode-jest runs (via watch) my unit tests, if I so much as think about running cdktf or terraform the plan and validate tests fail and I get errors about the docker or aws provider "text file busy". It seems like multiple CDKTF stack concurrency has race conditions with Terraform 1.4 due to the Dependency Lock file. |
Happening the same to me in GitHub Actions using https://github.com/marketplace/actions/terraform-cdk-action with multiple stacks deployment at once. When running it locally I do not face any issues 🤔. I think the issue is the same as hashicorp/terraform#31964 |
This issues seems to scale with the number of stacks being deployed at once. For context I'm deploying using Arch Linux locally and if I deploy to 3 stacks I have a low probability of hitting this error (<5% after ten attempts). As I deploy to more stacks at once (7 and 9 stacks) I tend to have a greater than 90% chance of hitting this error. Versions (All combinations tested): |
Hi there, any workaround? |
Sadly, the work-around is deploying to the least amount of stacks possible. I've started to deploy to four stack at a time and using the |
Hi 👋 Alternatively the |
Thank for your fix @DanielMSchmidt ❤️ |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Note
cdktf & Language Versions
cdktf = 0.15.5
Language = Python 3.10.10
Affected Resource(s)
Any stack resource.
Debug Output
Context : We have 2 stack (testtac-elastic and testtac-redis) which will both use the HELM provider to install some chart, and both will be executed in parallel with the same
cdktf deploy testtac-elastic testtac-redis
. We have randomly this kind of issue which happen (1 time on 100).Expected Behavior
No fail during the execution, cdktf should prevent the situation where 2 stack completely independent in their behaviour but using the same provider impact each other.
Actual Behavior
Random fail 1% of the time when 1 stack do it init step and the other one try to use it provider. We give this example but this happen in any other configuration where we have many stack execution in parallel which use the same provider
Steps to Reproduce
Create 2 stack which use the same provider and run them in same time with
cdktf deploy stack1 stack2
References
This look like to be a common issue with terraform parallel execution:
The text was updated successfully, but these errors were encountered: