Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

VenelinMartinov
Copy link
Contributor

Ahead of #1785, it might be wise to add this to allow users to debug or work around PRC issues.

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 61.10%. Comparing base (f5a6151) to head (84759f0).
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/tfshim/sdk-v2/provider.go 33.33% 2 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

@VenelinMartinov VenelinMartinov requested a review from iwahbe June 10, 2024 17:04
// 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)
Copy link
Member

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".

Copy link
Contributor Author

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.

Copy link
Member

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.

@VenelinMartinov VenelinMartinov force-pushed the vvm/allow_PRC_disable_env_var branch from 52191a2 to 84759f0 Compare June 10, 2024 17:15
@VenelinMartinov VenelinMartinov requested a review from iwahbe June 10, 2024 17:17
@mjeffryes mjeffryes added this to the 0.107 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants