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

Add Warnings when Resource Options are applied to Components with no effect #9921

Merged
merged 5 commits into from Jun 23, 2022

Conversation

RobbieMcKinstry
Copy link
Contributor

Description

This PR is a follow-on to #9863. There are some resource options that have no effect when applied to component resources. This PR will produce a warning each time those options are applied to components.
The initial PR was scoped to emit a warning for the ignoreChanges option, while this PR addresses resource options customTimeouts, additinoalSecretOutputs, replaceOnChanges, and retainOnDelete as well.

Fixes #9877

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG-PENDING file with my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@RobbieMcKinstry RobbieMcKinstry added kind/enhancement Improvements or new features impact/usability Something that impacts users' ability to use the product easily and intuitively size/S Estimated effort to complete (1-2 days). area/core resolution/fixed This issue was fixed labels Jun 22, 2022
@RobbieMcKinstry RobbieMcKinstry added this to the 0.74 milestone Jun 22, 2022
@RobbieMcKinstry RobbieMcKinstry changed the title Rmckinstry/#9877 Add Warnings when Resource Options are applied to Components with no effect Jun 22, 2022
Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint is failing, you need a t.Parallel() inside the cases for loop:

engine/lifeycletest/pulumi_test.go:5365:2: Range statement for test TestComponentOptionWarnings missing the call to method parallel in test Run (paralleltest)
	for i, testCase := range cases {

CHANGELOG_PENDING.md Outdated Show resolved Hide resolved
pkg/engine/lifeycletest/pulumi_test.go Outdated Show resolved Hide resolved
pkg/resource/deploy/source_eval.go Outdated Show resolved Hide resolved
@RobbieMcKinstry
Copy link
Contributor Author

I should probably rebase this after the release. It's probably fine and unlikely to introduce a merge conflict in CHANGELOG_PENDING but possible, I suppose.

Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features resolution/fixed This issue was fixed size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Warnings for Ignored Options on Components
2 participants