-
Notifications
You must be signed in to change notification settings - Fork 274
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
refactor(terraform): don't init in status handler #6825
Conversation
73bce0e
to
aa9851d
Compare
Before this fix, we were calling `terraform init` in the `getStatusHandler` which is an undesired side effect. With this refactor we now call it in the `prepareEnvironment` handler which is were it should be. Also note that in PR #6706 we changed the provider init flow such that we now always call `prepareEnvironment` and the `getStatusHandler` isn't really used any more. That's why I also removed the call to that handler from the `prepareEnvironment` function and instead moved the logic there. It's basically duplicated across both handlers now which is fine because we're removing the status handler in 0.14.
aa9851d
to
3417ffa
Compare
Just for understanding, did you mean we always call |
This is only on the provider level. Specifically, when initialising providers we dropped the flow where first we call It was just a needless abstraction that really complicated the whole process and didn't add any value. Now we always call However, we still call the But we didn't change anything around the action level life cycle. Does that answer your question? |
Yes thanks, that's also how i understood it, just wanted to make sure :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What this PR does / why we need it:
Before this fix, we were calling
terraform init
in thegetStatusHandler
which is an undesired side effect.With this refactor we now call it in the
prepareEnvironment
handler which is were it should be.Also note that in PR #6706 we changed the provider init flow such that we now always call
prepareEnvironment
and thegetStatusHandler
isn't really used any more.That's why I also removed the call to that handler from the
prepareEnvironment
function and instead moved the logic there.It's basically duplicated across both handlers now which is fine because we're removing the status handler in 0.14.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: