-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Project configuration (Pulumi.yaml
) option to refresh before every preview
/update
/destroy
#8058
Comments
Hi @infin8x So I need a little clarification on the work here - should the Paul |
Generally in this situation, command-line flags should take precedence over the config file. That way a user can set a default behavior but still override it for a specific execution. The most common approach I've seen in other projects is:
Another common pattern to keep in mind for if you do decide to change the default behavior in 4.0: many projects will issue a depreciation notice for a few releases prior to changing a default. This notice would typically be printed during program execution, state what behavior is changing, and direct users who wish to retain the current behavior to set it explicitly set it in their config file (usually with an additional note that doing so will silence the deprecation warning). The notice should not be displayed to users who already have an explicit setting in place, since they won't see a behavior change. Git took this approach, for example, prior to changing the default setting for |
Fixes: #8058 A user can now set `autoRefresh: true` in Pulumi.yaml to make all derivative stacks to refresh by default when running an update, preview or destroy command. We also introduce a new `--skip-refresh` variable to be used in conjunction with the Pulumi.yaml update the specific CLI commands still override this argument. Therefore: * If a user sets autoRefresh: true, they can override this behaviour with `--skip-refresh` * if a user sets `--refresh` then it will use that by default * if no cli args are passed but `autoRefresh: true` then we will perform a refresh * the default behaviour still exists of no refresh
Fixes: #8058 A user can now set `autoRefresh: true` in Pulumi.yaml to make all derivative stacks to refresh by default when running an update, preview or destroy command. We also introduce a new `--skip-refresh` variable to be used in conjunction with the Pulumi.yaml update the specific CLI commands still override this argument. Therefore: * If a user sets autoRefresh: true, they can override this behaviour with `--skip-refresh` * if a user sets `--refresh` then it will use that by default * if no cli args are passed but `autoRefresh: true` then we will perform a refresh * the default behaviour still exists of no refresh
Fixes: #8058 A user can now specify the following in their Pulumi.yaml ``` options: refresh: always ``` This will cause the derivative stacks to refresh by default when running an update, preview or destroy command. We can override this with `--refresh=false` the specific CLI commands still override this argument. Therefore: * If a user sets refresh: always, they can override this behaviour with `--refresh==false` * if a user sets `--refresh` or `--refresh=true` then it will use that by default * if no cli args are passed but `refresh: always` then we will perform a refresh * the default behaviour still exists of no refresh
Fixes: #8058 A user can now specify the following in their Pulumi.yaml ``` options: refresh: always ``` This will cause the derivative stacks to refresh by default when running an update, preview or destroy command. We can override this with `--refresh=false` the specific CLI commands still override this argument. Therefore: * If a user sets refresh: always, they can override this behaviour with `--refresh==false` * if a user sets `--refresh` or `--refresh=true` then it will use that by default * if no cli args are passed but `refresh: always` then we will perform a refresh * the default behaviour still exists of no refresh
Fixes: #8058 A user can now specify the following in their Pulumi.yaml ``` options: refresh: always ``` This will cause the derivative stacks to refresh by default when running an update, preview or destroy command. We can override this with `--refresh=false` the specific CLI commands still override this argument. Therefore: * If a user sets refresh: always, they can override this behaviour with `--refresh==false` * if a user sets `--refresh` or `--refresh=true` then it will use that by default * if no cli args are passed but `refresh: always` then we will perform a refresh * the default behaviour still exists of no refresh
Fixes: #8058 A user can now specify the following in their Pulumi.yaml ``` options: refresh: always ``` This will cause the derivative stacks to refresh by default when running an update, preview or destroy command. We can override this with `--refresh=false` the specific CLI commands still override this argument. Therefore: * If a user sets refresh: always, they can override this behaviour with `--refresh==false` * if a user sets `--refresh` or `--refresh=true` then it will use that by default * if no cli args are passed but `refresh: always` then we will perform a refresh * the default behaviour still exists of no refresh
Following up on a suggestion in #2247 (comment), let's introduce a new config option that will cause the engine to run a refresh before every
preview
/update
/destroy
operation. This should be logically equivalent to the user remembering to always add--refresh
to those operations.Suggested option name/type:
alwaysRefresh
(boolean)The text was updated successfully, but these errors were encountered: