-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Seemingly random parse failures #4982
Comments
Thanks for the report @lukesteensen. Sounds like a race condition in the parser. Sorry for the trouble it caused you during |
Thanks @phinze! Much appreciated |
Just a quick update here - I've got local reproduction thanks to your example. Still working on root cause diagnosis. Will follow up as soon as I know more. |
Fixes an interpolation race that was occurring when a tainted destroy node and a primary destroy node both tried to interpolate a computed count in their config. Since they were sharing a pointer to the _same_ config, depending on how the race played out one of them could catch the config uninterpolated and would then throw a syntax error. The `Copy()` tree implemented for this fix can probably be used elsewhere - basically we should copy the config whenever we drop nodes into the graph - but for now I'm just applying it to the place that fixes this bug. Fixes #4982
Fixes an interpolation race that was occurring when a tainted destroy node and a primary destroy node both tried to interpolate a computed count in their config. Since they were sharing a pointer to the _same_ config, depending on how the race played out one of them could catch the config uninterpolated and would then throw a syntax error. The `Copy()` tree implemented for this fix can probably be used elsewhere - basically we should copy the config whenever we drop nodes into the graph - but for now I'm just applying it to the place that fixes this bug. Fixes #4982 - Includes a test covering that race condition.
Fixes an interpolation race that was occurring when a tainted destroy node and a primary destroy node both tried to interpolate a computed count in their config. Since they were sharing a pointer to the _same_ config, depending on how the race played out one of them could catch the config uninterpolated and would then throw a syntax error. The `Copy()` tree implemented for this fix can probably be used elsewhere - basically we should copy the config whenever we drop nodes into the graph - but for now I'm just applying it to the place that fixes this bug. Fixes #4982 - Includes a test covering that race condition.
Fixes an interpolation race that was occurring when a tainted destroy node and a primary destroy node both tried to interpolate a computed count in their config. Since they were sharing a pointer to the _same_ config, depending on how the race played out one of them could catch the config uninterpolated and would then throw a syntax error. The `Copy()` tree implemented for this fix can probably be used elsewhere - basically we should copy the config whenever we drop nodes into the graph - but for now I'm just applying it to the place that fixes this bug. Fixes hashicorp#4982 - Includes a test covering that race condition.
Fixes an interpolation race that was occurring when a tainted destroy node and a primary destroy node both tried to interpolate a computed count in their config. Since they were sharing a pointer to the _same_ config, depending on how the race played out one of them could catch the config uninterpolated and would then throw a syntax error. The `Copy()` tree implemented for this fix can probably be used elsewhere - basically we should copy the config whenever we drop nodes into the graph - but for now I'm just applying it to the place that fixes this bug. Fixes hashicorp#4982 - Includes a test covering that race condition.
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 have 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. |
This can be reproduced on v0.6.11 with https://gist.github.com/lukesteensen/00d59e66f3ac20b4b6e8
It's pretty trivial to run the example multiple times and see failures while refreshing state, creating the plan, and applying the plan.
We've run into cases in our actual infrastructure where instances were destroyed and not recreated due to this error happening mid-apply.
The text was updated successfully, but these errors were encountered: