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

stacks: handle deferred actions in refresh #34887

Merged
merged 5 commits into from
Apr 8, 2024
Merged

stacks: handle deferred actions in refresh #34887

merged 5 commits into from
Apr 8, 2024

Conversation

DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Mar 26, 2024

Co-authored-by: Matej Risek [email protected]

Target Release

1.8.x

Draft CHANGELOG entry

NEW FEATURES

  • stacks: handle deferred actions in refresh

@DanielMSchmidt DanielMSchmidt changed the title TF 13958 stacks: handle deferred actions in refresh Mar 26, 2024
@DanielMSchmidt DanielMSchmidt changed the base branch from main to TF-13954 March 26, 2024 16:25
Base automatically changed from TF-13954 to main April 2, 2024 12:05
@DanielMSchmidt DanielMSchmidt marked this pull request as ready for review April 2, 2024 12:07
internal/providers/provider.go Outdated Show resolved Hide resolved
internal/providers/provider.go Outdated Show resolved Hide resolved
internal/terraform/node_resource_abstract_instance.go Outdated Show resolved Hide resolved
internal/terraform/context_apply_deferred_test.go Outdated Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt marked this pull request as draft April 3, 2024 12:26
"upstream_names": cty.NullVal(cty.Set(cty.String)),
}),
},
wantDeferred: make(map[string]providers.DeferredReason),
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect to see a value in here, if the resource is being deferred. Do we know why there isn't anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, looked into it, seems like my mock was incorrect and I was testing the not-deferred path all along. Since I was a bit confused what I should be asserting mid way through this issue I was assuming the test to be right and relying on you to verify my assertions to be correct. Now that I fixed the mock it works (and I found a panic to fix, double win)

internal/terraform/node_resource_plan_instance.go Outdated Show resolved Hide resolved
Copy link
Member

@liamcervante liamcervante left a comment

Choose a reason for hiding this comment

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

LGTM, just some minor nits wrt debugging statements and comments.

internal/terraform/context_apply_deferred_test.go Outdated Show resolved Hide resolved
internal/terraform/context_apply_deferred_test.go Outdated Show resolved Hide resolved
internal/terraform/context_apply_deferred_test.go Outdated Show resolved Hide resolved
internal/terraform/node_resource_plan_instance.go Outdated Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt force-pushed the TF-13958 branch 2 times, most recently from b3eac2b to bdf223b Compare April 8, 2024 11:32
We are moving the deferred reason from plans/deferring to providers
to have a single representation of deferred reason to be used from
providers to the plan. Using the plan's representation causes circular
dependencies.

Co-authored-by: Matej Risek <[email protected]>
@DanielMSchmidt DanielMSchmidt merged commit 3fdfbd6 into main Apr 8, 2024
10 checks passed
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@DanielMSchmidt DanielMSchmidt deleted the TF-13958 branch April 8, 2024 12:25
Copy link
Contributor

github-actions bot commented May 9, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants