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: Firestore datastore mode index support #8713

Merged
merged 8 commits into from
Oct 2, 2023

Conversation

pl04351820
Copy link
Contributor

@pl04351820 pl04351820 commented Aug 19, 2023

feat: Firestore datastore mode index support

This includes a support for datastore mode index under Firestore index surface. This allows Terraform users to manage datastore mode index for non-default databases via Firestore index surface.

If this PR is for Terraform, I acknowledge that I have:

  • 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).
  • 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).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

firestore: added `api_scope` field to `google_firestore_index` resource

* adding security_policy field to targetPool

* updating target pool documentation with security policy
@pl04351820 pl04351820 changed the title Support datastore mode index feat: Firestore datastore mode index support Aug 19, 2023
@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 awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Aug 19, 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 ( 2 files changed, 34 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 2 files changed, 34 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_firestore_index (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_firestore_index" "primary" {
  api_scope = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2980
Passed tests 2680
Skipped tests: 295
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataplexDatascan_dataplexDatascanFullProfileExample|TestAccDataplexDatascan_dataplexDatascanBasicQualityExample|TestAccFirestoreIndex_firestoreIndexBasicExample|TestAccDataSourceGoogleServiceAccountJwt|TestAccDataSourceGoogleServiceAccountAccessToken_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataplexDatascan_dataplexDatascanFullProfileExample[Debug log]
TestAccDataplexDatascan_dataplexDatascanBasicQualityExample[Debug log]
TestAccDataSourceGoogleServiceAccountJwt[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:}}$
TestAccFirestoreIndex_firestoreIndexBasicExample[Error message] [Debug log]
TestAccDataSourceGoogleServiceAccountAccessToken_basic[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

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 21, 2023
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 21, 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, 28 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 28 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_firestore_index (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_firestore_index" "primary" {
  api_scope = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2982
Passed tests 2686
Skipped tests: 295
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
TestAccFirestoreIndex_firestoreIndexBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccFirestoreIndex_firestoreIndexBasicExample[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
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, 28 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 28 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_firestore_index (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_firestore_index" "primary" {
  api_scope = # value needed
}

@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, 104 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 4 files changed, 109 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2987
Passed tests 2690
Skipped tests: 295
Affected tests: 2

Action taken

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccFirestoreIndex_firestoreIndexDatastoreModeExample[Debug log]
TestAccHealthcareDatasetIamPolicy[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

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.

Left comment inline in #8713 (comment) incase you're not aware of. Sorry that github comment reply is not so easy to be spotted.

@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, 110 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 3 files changed, 110 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2991
Passed tests 2694
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
TestAccFirestoreIndex_firestoreIndexBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccFirestoreIndex_firestoreIndexBasicExample[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

@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, 114 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 3 files changed, 114 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2991
Passed tests 2693
Skipped tests: 296
Affected tests: 2

Action taken

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

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{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccFirestoreIndex_firestoreIndexBasicExample[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

mmv1/.ruby-version Outdated Show resolved Hide resolved
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 LGTM, only one small comment. Please remove the change as @rwhogg mentioned. (uncheck the commit from this PR would be nice). Thanks!

@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, 112 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 3 files changed, 112 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@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, 117 insertions(+), 9 deletions(-))
Terraform Beta: Diff ( 4 files changed, 117 insertions(+), 14 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3081
Passed tests 2779
Skipped tests: 299
Affected tests: 3

Action taken

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccWorkstationsWorkstationConfig_update[Debug log]
TestAccWorkstationsWorkstationConfig_updateHostDetails[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:}}$
TestAccDataprocClusterIamPolicy[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

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.

LGTM! Sorry we're currently locking the main branch contribution for major release preparation. I will merge this PR after it's unlocked, likely before early next week. Thanks!

@shuyama1
Copy link
Member

unlocked now! rerun tests before merging! /gcbrun

@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, 117 insertions(+), 9 deletions(-))
Terraform Beta: Diff ( 3 files changed, 117 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3102
Passed tests 2779
Skipped tests: 313
Affected tests: 10

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeInstanceTemplate_withScratchDisk|TestAccComputeInstance_with375GbScratchDisk|TestAccComputeInstanceFromTemplate_overrideScratchDisk|TestAccComputeInstanceFromTemplate_localSsdRecoveryTimeout|TestAccComputeInstanceFromTemplate_self_link_unique|TestAccComputeInstanceFromTemplate_basic|TestAccComputeInstanceFromRegionTemplate_basic|TestAccComputeInstanceFromTemplateWithOverride_localSsdRecoveryTimeout|TestAccContainerCluster_withAddons|TestAccWorkstationsWorkstationConfig_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInstanceFromTemplate_overrideScratchDisk[Debug log]
TestAccComputeInstanceFromTemplate_localSsdRecoveryTimeout[Debug log]
TestAccComputeInstanceFromTemplate_self_link_unique[Debug log]
TestAccComputeInstanceFromTemplate_basic[Debug log]
TestAccComputeInstanceFromRegionTemplate_basic[Debug log]
TestAccComputeInstanceFromTemplateWithOverride_localSsdRecoveryTimeout[Debug log]
TestAccWorkstationsWorkstationConfig_update[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:}}$
TestAccComputeInstanceTemplate_withScratchDisk[Error message] [Debug log]
TestAccComputeInstance_with375GbScratchDisk[Error message] [Debug log]
TestAccContainerCluster_withAddons[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

@pl04351820 Would you mind rebasing the PR. I think the terraform-google-conversion-test failures will probably be resolved after rebasing

@pl04351820
Copy link
Contributor Author

@shuyama1 Done!

@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, 117 insertions(+), 9 deletions(-))
Terraform Beta: Diff ( 3 files changed, 117 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3110
Passed tests 2786
Skipped tests: 314
Affected tests: 10

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeInstanceFromTemplate_overrideScratchDisk|TestAccComputeInstanceFromTemplateWithOverride_localSsdRecoveryTimeout|TestAccComputeInstanceFromTemplate_localSsdRecoveryTimeout|TestAccComputeInstanceFromRegionTemplate_basic|TestAccComputeInstanceFromTemplate_self_link_unique|TestAccComputeInstanceFromTemplate_basic|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerCluster_withAddons|TestAccContainerCluster_withDeletionProtection

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInstanceFromTemplate_overrideScratchDisk[Debug log]
TestAccComputeInstanceFromTemplateWithOverride_localSsdRecoveryTimeout[Debug log]
TestAccComputeInstanceFromTemplate_localSsdRecoveryTimeout[Debug log]
TestAccComputeInstanceFromRegionTemplate_basic[Debug log]
TestAccComputeInstanceFromTemplate_self_link_unique[Debug log]
TestAccComputeInstanceFromTemplate_basic[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:}}$
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccContainerCluster_withDeletionProtection[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

@pl04351820
Copy link
Contributor Author

Looks like TestAccContainerNodePool and TestAccContainerCluster still failed with unrelated issues

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.

The failing tests are unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants