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

[WIP] helper/schema: GetOkExists always returns true on updates #17557

Closed
wants to merge 1 commit into from

Conversation

radeksimko
Copy link
Member

This was discovered when debugging hashicorp/terraform-provider-aws#3642

Please note that this PR contains just a failing test, not the actual fix at this point (hence WIP). I felt it's useful to raise it, instead of trying to describe the problem in words in an issue.

cc @appilon

@apparentlymart
Copy link
Contributor

GetOkExists was implemented with the knowledge that right now it wasn't going to be 100% effective, because the underlying model here doesn't preserve enough information to give an accurate answer all of the time. (See #15723, where I'd described this problem albeit in terms of boolean values rather than integers.)

Given how close we are to switching to using the HCL2 type system for the provider protocol, I'd suggest that we pause on this for now and then think about it when we port the GetOk and GetOkExists methods over to the new underlying model, and decide what is best for each of them to do here. It will probably take some testing to figure out how much room there is for adjusting the behavior here without violating existing expectations, so knowing a specific use-case in hashicorp/terraform-provider-aws#3642 will be helpful to give us something concrete to test with.

@radeksimko
Copy link
Member Author

That makes sense to me. Feel free to either close or leave open. At least we have a test case we can come back to and discuss.

@ghost
Copy link

ghost commented Sep 8, 2019

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 and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants