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 implied data depends_on caveat #27267

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Dec 11, 2020

Trying to find a way to better document the implied depends_on behavior with data resources, as seen in #27171.

This behavior was re-introduced in order to satisfy #25961, and remain compatible with a large base of existing provider acceptance tests. The original behavior however only worked on the first apply, and could return incorrect results on subsequent changes. Making this work in all cases has the unfortunate side effect of causing data sources to be deferred until apply far more often, hence the workaround presented here.

@jbardin jbardin requested a review from a team December 11, 2020 18:49
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #27267 (cd4cb3f) into master (9b0af78) will not change coverage.
The diff coverage is n/a.

Impacted Files Coverage Δ
terraform/node_resource_plan.go 96.11% <0.00%> (-1.95%) ⬇️
dag/walk.go 92.25% <0.00%> (+0.70%) ⬆️
dag/marshal.go 63.49% <0.00%> (+1.58%) ⬆️

Copy link
Member

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

Thanks for documenting this… edge case! 🥁

Do you think it would be reasonable to add an example to explain what is meant by adding the local hop to the reference? The S3 bucket case from #27171, for instance. Maybe it would end up being too much detail, though, so I'm not sure.

@jbardin
Copy link
Member Author

jbardin commented Dec 11, 2020

I'm not sure either. I don't really like contrived examples where precise language can suffice, but we could always add something later if it's found to still be confusing.

@jbardin jbardin merged commit 6d0db83 into master Dec 11, 2020
@jbardin jbardin deleted the jbardin/data-reference-doc branch December 11, 2020 20:21
@ghost
Copy link

ghost commented Jan 11, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 11, 2021
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.

None yet

2 participants