-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixed a problem in which only ConfigId was calculated first when the API parameter was set to Known After Apply #9708
Conversation
Hello! I am a robot. It looks like you are a: Community Contributor @NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccEndpointsService_grpcNotPreComputeConfigId |
Rerun these tests in REPLAYING mode to catch issues
|
@NickElliot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM! The logic makes sense and the new test fulfills the conditions of the computed fields no longer producing errors. Would it be possible to add another test that verifies for openapi_config in addition to the other two currently covered fields?
@NickElliot |
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccEndpointsService_grpcNotPreComputeConfigIdByGrpcConfig|TestAccEndpointsService_openapiNotPreComputeConfigId |
Rerun these tests in REPLAYING mode to catch issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine as is. Thanks for the contribution!
…elds were unknown at plan time (GoogleCloudPlatform#9708) * Add case of valueUnknown in configId pre-computing * add openapi parameters test
…elds were unknown at plan time (GoogleCloudPlatform#9708) * Add case of valueUnknown in configId pre-computing * add openapi parameters test
…elds were unknown at plan time (GoogleCloudPlatform#9708) * Add case of valueUnknown in configId pre-computing * add openapi parameters test
…elds were unknown at plan time (GoogleCloudPlatform#9708) * Add case of valueUnknown in configId pre-computing * add openapi parameters test
If certain attributes such as protoc_output_base64 are modified, the config_id is pre-computed, but if these attributes are (known after apply) at plan time and there is no diff as a result of apply, the plan result will not match, Error: Provider produced inconsistent final plan.
Therefore, if these attributes are modified and their values are non-deterministic, the config_id is now also calculated at apply time.
The added test case has the dependency endpoints <- key2 <- key1, and the attribute of key2 is used in grpc_config of endpoints.
If the attribute of key2 referenced in endpoints is known after apply for some reason, and as a result there is no diff in the attribute of key2, only the config_id will be changed, but in that case it will not be applied and
Provider produced inconsistent final plan
error happened.As a specific case, we have confirmed the occurrence of this problem in the product code in cases where grpc-config, protoc-descriptor, etc. are obtained through multiple resources such as local_file, etc. and external files obtained by null_resource.
I have closed P/R and newly opened because discovering that the previous P/R had many incorrect modified source code, corrections, tests, etc.
Fixes hashicorp/terraform-provider-google#11776
Release Note Template for Downstream PRs (will be copied)