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

Make another example for Rules release to a non-default Firestore db #12263

Merged
merged 4 commits into from
Nov 20, 2024

Conversation

rainshen49
Copy link
Contributor

Fixes hashicorp/terraform-provider-google#16324
Fixes hashicorp/terraform-provider-google#15838

Deploying rules to non-default Firestore instances already works. Adding examples to guide users better.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

Copy link

github-actions bot commented Nov 6, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

google provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 3
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseAdditionalHandWritten
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseAdditionalHandWritten [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rainshen49 rainshen49 marked this pull request as draft November 6, 2024 19:40
@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.

google provider: Diff ( 2 files changed, 84 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 84 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 4
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@rainshen49 rainshen49 marked this pull request as ready for review November 6, 2024 20:10
Copy link

@melinath This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions github-actions bot requested a review from melinath November 12, 2024 15:11
@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.

google provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 4
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them 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.

google provider: Diff ( 2 files changed, 72 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 2 files changed, 72 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 4
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them 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.

google provider: Diff ( 2 files changed, 84 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 84 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 5
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • firebaserules

🟢 All tests passed!

View the build log

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

google provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 72 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 4
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Per discussion above, please make the firebase_release test docs-only: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/tpgtools/README.md?plain=1#L234 (or make it run in its own project)

@github-actions github-actions bot requested a review from melinath November 20, 2024 15:14
@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.

google provider: Diff ( 2 files changed, 74 insertions(+), 19 deletions(-))
google-beta provider: Diff ( 2 files changed, 74 insertions(+), 19 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 5
Passed tests: 3
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • firebaserules

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
  • TestAccFirebaserulesRelease_FirestoreReleaseAdditionalHandWritten
  • TestAccFirebaserulesRelease_FirestoreReleaseHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFirebaserulesRelease_FirestoreReleaseAdditionalHandWritten [Error message] [Debug log]
TestAccFirebaserulesRelease_FirestoreReleaseHandWritten [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rainshen49
Copy link
Contributor Author

@melinath The docs say we should hide the yaml, but what I found is that I should hide the tf.tmpl instead. Or should I hide both?

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

google provider: Diff ( 2 files changed, 30 insertions(+), 21 deletions(-))
google-beta provider: Diff ( 2 files changed, 30 insertions(+), 21 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4
Passed tests: 4
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • firebaserules

🟢 All tests passed!

View the build log

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

I'm not exactly sure why the docs say that if it doesn't work; I do see other test_hide usage that uses the yaml files and looks like it's working... but if using tf.tmpl works then do that.

It looks like the two templates are identical now; am I missing something? Do you need both? (Are both supposed to be in docs?)

@rainshen49
Copy link
Contributor Author

rainshen49 commented Nov 20, 2024

I'm not exactly sure why the docs say that if it doesn't work; I do see other test_hide usage that uses the yaml files and looks like it's working... but if using tf.tmpl works then do that.

It looks like the two templates are identical now; am I missing something? Do you need both? (Are both supposed to be in docs?)

Yup. The only difference is in the name field. The rules for default Firestore instance is just named cloud.firestore whereas additional databases needs cloud.firestore/{{database name}}. This is why it's quite trivial and only one test is needed. However, it's important for users to know the names thus showing both in the docs.

@github-actions github-actions bot requested a review from melinath November 20, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants