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

Swap CtyInstanceState with PlanResourceChange flag #3359

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Jan 30, 2024

An experiment to see if PlanResourceChange can substitute for CtyInstanceState while still handling wafv2_web_acl resource correctly. See #3361

Copy link

Does the PR have any schema changes?

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

@t0yv0 t0yv0 requested a review from iwahbe January 31, 2024 21:08
@t0yv0 t0yv0 marked this pull request as ready for review January 31, 2024 21:08
@t0yv0
Copy link
Member Author

t0yv0 commented Jan 31, 2024

This slightly regressed on the ability to cleanly refresh the state for the example program #3361 - but the unclean refresh now matches TF actual changes. It's in a broad category of issues of this sort, we need to figure out the policy for it. So I slightly am leaning on recommending to merge this in so we can retire CtyInstanceState.

@t0yv0 t0yv0 requested a review from VenelinMartinov January 31, 2024 21:09
@VenelinMartinov
Copy link
Contributor

The unclean refresh is rather unfortunate but probably not a big deal.
I think I saw somewhere that it only happens once and then doesn't happen during subsequent up/refreshes, is this correct?

Does refresh run Diff? Could we add some diff customization for these properties to say null and empty are the same?

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

Let's retire CtyInstanceState. Diff (as supplied by the bridge) should mirror TF. We can think of adding diff customizers for this resource later if it becomes necessary.

provider/resources.go Outdated Show resolved Hide resolved
@t0yv0
Copy link
Member Author

t0yv0 commented Feb 1, 2024

I think I saw somewhere that it only happens once and then doesn't happen during subsequent up/refreshes, is this correct?

Yes.

I still think we might want to work that one out to be more friendlier but it is indeed somewhat tolerable.

@t0yv0
Copy link
Member Author

t0yv0 commented Feb 1, 2024

We can think of adding diff customizers for this resource later if it becomes necessary.

That I think is not quite it, we currently match TF as TF has non-empty refresh also! I think we don't want to modify TF behavior. Instead I think we need to collect all instances of this benign non-empty refresh (there's a lot) and put some generic targeted workaround that makes the Pulumi experience better. Perhaps suppress refresh diffs from nil to empty list under right schema condition or some such.

@t0yv0 t0yv0 merged commit 60fee05 into master Feb 2, 2024
18 checks passed
@t0yv0 t0yv0 deleted the t0yv0/try-to-remove-brige-flag branch February 2, 2024 19:12
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