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

feat(vertexai): Make it possible to use Private Service Connect in Vertex AI Index Endpoint #8851

Conversation

shotarok
Copy link
Contributor

@shotarok shotarok commented Sep 2, 2023

part of hashicorp/terraform-provider-google#12818

Release Note Template for Downstream PRs (will be copied)

vertexai: added `private_service_connect_config` to `google_vertex_ai_index_endpoint`

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@shuyama1, 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.

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 2, 2023
@shotarok
Copy link
Contributor Author

shotarok commented Sep 2, 2023

@shuyama1 Hello, when you have time, could you approve the cloud builder to run the acceptance tests? Thanks

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 5, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 180 insertions(+))
Terraform Beta: Diff ( 3 files changed, 180 insertions(+))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3009
Passed tests 2712
Skipped tests: 296
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccVertexAIIndexEndpoint_vertexAiIndexEndpointWithPscExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccVertexAIIndexEndpoint_vertexAiIndexEndpointWithPscExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Comment on lines 110 to 116
- !ruby/object:Api::Type::Boolean
name: enablePrivateServiceConnect
description: If set to true, the IndexEndpoint is created without private service access.
- !ruby/object:Api::Type::Array
name: projectAllowlist
description: A list of Projects from which the forwarding rule will target the service attachment.
item_type: Api::Type::String
Copy link
Member

Choose a reason for hiding this comment

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

Are these two subfields also immutable? If so, I think we need to add immutable as well. If not, it's be nice that we add an update test on it.

Plus, can we make at least one of the subfields required. We 'd try to avoid users from sending empty object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The subfields were immutable although I tested a PATCH request. Based on your advice, I added immutable: and required: in debd2d1.

Comment on lines 59 to 60
test_vars_overrides:
network_name: 'acctest.BootstrapSharedTestNetwork(t, "vertex-ai-index-endpoint")'
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look like that network_name is being used anywhere in the test. Feel free to remove it if it's not needed

Copy link
Contributor Author

@shotarok shotarok Sep 6, 2023

Choose a reason for hiding this comment

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

I confirmed an acceptance test succeeded after removing it. Therefore, I've deleted it in 1a0f1ea.

mmv1/products/vertexai/IndexEndpoint.yaml Show resolved Hide resolved
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 6, 2023
@shotarok
Copy link
Contributor Author

shotarok commented Sep 6, 2023

@shuyama1 Thank you for your feedback! I've updated the code. Please approve the cloud build job again. Thanks

@shotarok
Copy link
Contributor Author

shotarok commented Sep 6, 2023

I merged main to resolve a conflict because another PR for IndexEndpoint was merged

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 6, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 183 insertions(+))
Terraform Beta: Diff ( 3 files changed, 183 insertions(+))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 4 files changed, 118 insertions(+))

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Overall looks good. Only small comment though

@@ -65,7 +68,6 @@ parameters:
url_param_only: true
immutable: true
properties:
# Intentionally deployedIndexes[] is not included because it's an output-only field and another terraform resource will manage a deployed index.
Copy link
Member

Choose a reason for hiding this comment

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

Any reason we're removing this comment?

Copy link
Contributor Author

@shotarok shotarok Sep 6, 2023

Choose a reason for hiding this comment

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

Ah, I initially defined deployedIndexes in this PR, but I reverted it because of #8851 (comment). At that time, I forgot to revert the comment. I'll restore it. Thank you for the catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shuyama1 I fixed it in 40903e2 👍 When you have time, could you approve CI again? Thanks

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 6, 2023
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3015
Passed tests 2718
Skipped tests: 296
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataprocClusterIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataprocClusterIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 6, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 183 insertions(+))
Terraform Beta: Diff ( 3 files changed, 183 insertions(+))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 4 files changed, 118 insertions(+))

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 6, 2023
@shotarok
Copy link
Contributor Author

shotarok commented Nov 6, 2023

@shuyama1 I updated the code and replied to the comments. If the changes look good, please approve the CI to run the acceptance tests. Thanks!

@@ -48,11 +48,20 @@ examples:
- !ruby/object:Provider::Terraform::Examples
name: "vertex_ai_index_endpoint"
primary_resource_id: "index_endpoint"
skip_docs: true
Copy link
Member

Choose a reason for hiding this comment

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

we'd prefer to keep example of this config in the test but skip vertex_ai_index_endpoint_with_false_psc instead, since vertex_ai_index_endpoint is a standard basic config for the resource

Copy link
Contributor Author

@shotarok shotarok Nov 6, 2023

Choose a reason for hiding this comment

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

@shuyama1 Thank you for catching this mistake 🙏 It was unintentional. I moved skip_docs: true to the example: 8d0230b. It seems an additional approval is required for triggering cloud builder jobs.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 6, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 232 insertions(+), 21 deletions(-))
Terraform Beta: Diff ( 3 files changed, 232 insertions(+), 21 deletions(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 8 files changed, 231 insertions(+))

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 6, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 226 insertions(+))
Terraform Beta: Diff ( 3 files changed, 226 insertions(+))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 8 files changed, 231 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3205
Passed tests 2876
Skipped tests: 323
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerAwsCluster_BetaBasicHandWritten|TestAccContainerAwsCluster_BetaBasicEnumHandWritten|TestAccDataprocClusterIamPolicy|TestAccLoggingProjectSink_updatePreservesCustomWriter|TestAccSpannerDatabaseIamPolicy|TestAccVertexAIIndexEndpoint_vertexAiIndexEndpointWithFalsePscExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerAwsCluster_BetaBasicHandWritten[Debug log]
TestAccContainerAwsCluster_BetaBasicEnumHandWritten[Debug log]
TestAccDataprocClusterIamPolicy[Debug log]
TestAccSpannerDatabaseIamPolicy[Debug log]
TestAccVertexAIIndexEndpoint_vertexAiIndexEndpointWithFalsePscExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccLoggingProjectSink_updatePreservesCustomWriter[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@shuyama1
Copy link
Member

shuyama1 commented Nov 7, 2023

I think the failed tests/checks should resolve themselves in a rerun
/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/aiplatform-matching-engine and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 7, 2023
@modular-magician
Copy link
Collaborator

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 ( 3 files changed, 226 insertions(+))
Terraform Beta: Diff ( 3 files changed, 226 insertions(+))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))
TF OiCS: Diff ( 8 files changed, 231 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3221
Passed tests 2893
Skipped tests: 328
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Thank you!

@shotarok
Copy link
Contributor Author

shotarok commented Nov 8, 2023

@shuyama1 Thank you so much for your support and reviews! I'm excited to be able to use this new function through terraform!

@shotarok shotarok deleted the support-psc-in-vertex-ai-index-endpoint branch November 8, 2023 03:05
swamitagupta pushed a commit to swamitagupta/magic-modules that referenced this pull request Nov 14, 2023
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants