-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow disabling PRC via env var #2077
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2077 +/- ##
==========================================
- Coverage 61.19% 61.10% -0.09%
==========================================
Files 339 339
Lines 45130 45245 +115
==========================================
+ Hits 27617 27647 +30
- Misses 15992 16075 +83
- Partials 1521 1523 +2 ☔ View full report in Codecov by Sentry. |
pkg/tfshim/sdk-v2/provider.go
Outdated
// Do nothing, we will apply the default below. | ||
default: | ||
// The user set PULUMI_ENABLE_PLAN_RESOURCE_CHANGE to a value that isn't valid. | ||
warn("%s is not a valid value for %s", envPRC, envPRCVar) |
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.
This is not a function. I wasn't sure what the correct "warn" mechanism was here, so I left warn
as a placeholder for "warn the user".
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.
I don't know either so let's merge as is as this is low-value either way.
This is a debug only env var, primarily to be used by us. If any user is using it, it will be after we've given them the command, so should be ok.
Also BLAH=disable likely doesn't work anywhere.
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.
I don't know either so let's merge as is as this is low-value either way.
If there isn't a obvious logging mechanism here, we can just use the standard library's slog
.
This is a debug only env var, primarily to be used by us. If any user is using it, it will be after we've given them the command, so should be ok.
I don't want to respond to user's because they typed PULUMI_ENABLE_PLAN_RESOURCE_CHANGE=felse
. Even more so, I don't want to spend time because I typed felse
instead of `false.
Also BLAH=disable likely doesn't work anywhere.
BLAH=disable
currently works for PULUMI_ENABLE_PLAN_RESOURCE_CHANGE
.
52191a2
to
84759f0
Compare
Ahead of #1785, it might be wise to add this to allow users to debug or work around PRC issues.