magic-modules
magic-modules copied to clipboard
fix: added parameter region to google_vertex_ai_featurestore_entitytype
fixes {https://github.com/hashicorp/terraform-provider-google/issues/10100} : "google_vertex_ai_featurestore_entitytype: Cannot determine region: set in this resource, or set provider-level 'region' or 'zone' #10100.
If this PR is for Terraform, I acknowledge that I have:
- [x] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
- [x] Generated Terraform, and ran
make test
andmake lint
to ensure it passes unit and linter tests. - [x] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
- [x] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
- [x] Read the Release Notes Guide before writing my release note below.
Release Note Template for Downstream PRs (will be copied)
vertex_ai: added parameter region to google_vertex_ai_featurestore_entitytype to address bug #10100 ""google_vertex_ai_featurestore_entitytype: Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'"
Oops! It looks like you're using an unknown release-note type in your changelog entries:
- bug fix for #10100: https://github.com/hashicorp/terraform-provider-google/issues/10100}
Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.
Hello! I am a robot who works on Magic Modules PRs.
I've detected that you're a community contributor. @melinath, a repository maintainer, has been assigned to assist you and help review your changes.
:question: First time contributing? Click here for more details
Your assigned reviewer will help review your code by:
- Ensuring it's backwards compatible, covers common error cases, etc.
- Summarizing the change into a user-facing changelog note.
- Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.
If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 1 file changed, 4 insertions(+)) Terraform Beta: Diff ( 3 files changed, 12 insertions(+), 1 deletion(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2176
Passed tests 1934
Skipped tests: 238
Failed tests: 4
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeForwardingRule_update|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccFirebaserulesRelease_BasicRelease
Tests passed during RECORDING mode:
TestAccComputeForwardingRule_update
[Debug log]
TestAccFirebaserulesRelease_BasicRelease
[Debug log]
Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities
[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample
[Error message] [Debug log]
Please fix these to complete your PR View the build log or the debug log for each test
/gcbrun
I see that featurestore uses a region
field to store the location; that should be irrelevant from the perspective of the entitytype resource.
Looked into this briefly - the issue is that VertexAIBasePath gets recursively replaced with something that expects a {{region}}
field: https://github.com/hashicorp/terraform-provider-google-beta/blob/37b98fbd47237e80cedf2c9dd102fb71cd351fb5/google-beta/config.go#L451
Fixing this will likely require refactoring internals of the magic modules compiler.
the above suggestion doesn't work because this resource also doesn't have a location
field - the location is included as part of the parent resource field (featurestore).
Apologies for the delay. Here is a path forward:
- use extra_schema_entry to add a
region
field. Make sure that the field is marked as output-only. - Add a
custom_code.encoder
entry. - Inside the custom encoder, all you need to do (I believe) is return the obj and call
d.Set("region", valueextractedfromid)
Similar fix: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/encoders/redis_location_id_for_fallback_zone.go.erb
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 26 insertions(+)) Terraform Beta: Diff ( 1 file changed, 26 insertions(+)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
Tests analytics
Total tests: 2215
Passed tests 1974
Skipped tests: 239
Failed tests: 2
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
Tests failed during RECORDING mode:
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample
[Error message] [Debug log]
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
[Error message] [Debug log]
Please fix these to complete your PR View the build log or the debug log for each test
It looks like you also need to make sure that Import
sets the region field. I think that'll require a custom_code.custom_import
override. Basically: copy the existing import code and then add a few lines to match what you're doing in the encoder.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
The provider crashed while running the VCR tests in REPLAYING mode Please fix it to complete your PR View the build log
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
Tests analytics
Total tests: 2215
Passed tests 1974
Skipped tests: 239
Failed tests: 2
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample
Tests failed during RECORDING mode:
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
[Error message] [Debug log]
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample
[Error message] [Debug log]
Please fix these to complete your PR View the build log or the debug log for each test
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 35 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 1 file changed, 35 insertions(+), 8 deletions(-)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
Tests analytics
Total tests: 2216
Passed tests 1973
Skipped tests: 239
Failed tests: 4
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeForwardingRule_update
Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease
[Debug log]
TestAccComputeForwardingRule_update
[Debug log]
Tests failed during RECORDING mode:
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample
[Error message] [Debug log]
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
[Error message] [Debug log]
Please fix these to complete your PR View the build log or the debug log for each test
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 34 insertions(+), 6 deletions(-)) Terraform Beta: Diff ( 1 file changed, 34 insertions(+), 6 deletions(-)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
The provider crashed while running the VCR tests in REPLAYING mode Please fix it to complete your PR View the build log
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 1 file changed, 34 insertions(+), 8 deletions(-)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
Tests analytics
Total tests: 2216
Passed tests 1974
Skipped tests: 239
Failed tests: 3
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample|TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease
[Debug log]
Tests failed during RECORDING mode:
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeWithBetaFieldsExample
[Error message] [Debug log]
TestAccVertexAIFeaturestoreEntitytype_vertexAiFeaturestoreEntitytypeExample
[Error message] [Debug log]
Please fix these to complete your PR View the build log or the debug log for each test
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 1 file changed, 33 insertions(+)) Terraform Beta: Diff ( 1 file changed, 33 insertions(+)) TF Validator: Diff ( 3 files changed, 18 insertions(+), 4 deletions(-))
Tests analytics
Total tests: 2216
Passed tests 1976
Skipped tests: 239
Failed tests: 1
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease