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

Add Gemini Gemini Gcp Enablement Setting Binding resource #12897

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PerlMonker303
Copy link
Contributor

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

Add new resources for Gemini Admin Control

`google_gemini_gemini_gcp_enablement_setting_binding`

@github-actions github-actions bot requested a review from roaks3 January 28, 2025 17:14
Copy link

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

@roaks3, 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 need reviewer's approval to run presubmit tests label Jan 28, 2025
@modular-magician modular-magician added service/gemini and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 29, 2025
@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 ( 5 files changed, 761 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 966 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 96 insertions(+))

Missing test report

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

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

resource "google_gemini_gemini_gcp_enablement_setting_binding" "primary" {
  labels  = # value needed
  product = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • gemini

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
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample
  • TestAccGeminiLoggingSettingBinding_geminiLoggingSettingBindingBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample [Error message] [Debug log]
TestAccGeminiLoggingSettingBinding_geminiLoggingSettingBindingBasicExample_update [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

@PerlMonker303
Copy link
Contributor Author

Currently failing because it depends on Gemini Gemini Gcp Enablement Setting. Will fix after PR is submitted #12896.

Copy link

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

Copy link
Contributor

@roaks3 roaks3 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, but sounds like we need to wait for final approval until the other PR is merged

vars:
gemini_gcp_enablement_setting_id: ls-tf1
setting_binding_id: ls-tf1b1
target: projects/980109375338
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you describe what's going on with these hard-coded projects? If possible, the ideal would generally be to create temporary projects as part of the test config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gemini_gcp_enablement_setting_id is used to identify a GeminiGcpEnablementSetting (see PR #12896). setting_binding_id is used to identify the setting binding (main resource of this PR).
A setting binding binds a setting to a target (org/project/...). In this case, we bind the created setting with id "ls-tf1b1" to a fixed project that has all permissions required to achieve this.

Can you suggest an example of a temporary project creation process? I could not find anything in the docs/examples.

type: String
description: Required. Target of the binding.
required: true
- name: product
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like product isn't used in any tests (unless I missed it). Would be good to at least include it in the update test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. I added it now.

setting_binding_id = "{{index $.Vars "setting_binding_id"}}"
location = "global"
target = "{{index $.Vars "target"}}"
depends_on = [google_gemini_gemini_gcp_enablement_setting.basic]
Copy link
Contributor

Choose a reason for hiding this comment

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

If you can, it would be better to set gemini_gcp_enablement_setting_id to an output variable of google_gemini_gemini_gcp_enablement_setting.basic instead, which creates an implicit dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, thanks!

@github-actions github-actions bot requested a review from roaks3 February 3, 2025 09:47
@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, 164 insertions(+))
google-beta provider: Diff ( 6 files changed, 969 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 96 insertions(+))

Missing test report

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

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

resource "google_gemini_gemini_gcp_enablement_setting_binding" "primary" {
  labels  = # value needed
  product = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 9
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • gemini

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
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample
  • TestAccGeminiLoggingSettingBinding_geminiLoggingSettingBindingBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample [Error message] [Debug log]
TestAccGeminiLoggingSettingBinding_geminiLoggingSettingBindingBasicExample_update [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, 165 insertions(+))
google-beta provider: Diff ( 6 files changed, 974 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 96 insertions(+))

Missing test report

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

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

resource "google_gemini_gemini_gcp_enablement_setting_binding" "primary" {
  labels = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 9
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • gemini

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
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample [Error message] [Debug log]
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample_update [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, 164 insertions(+))
google-beta provider: Diff ( 6 files changed, 970 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 96 insertions(+))

Missing test report

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

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

resource "google_gemini_gemini_gcp_enablement_setting_binding" "primary" {
  labels = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 9
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • gemini

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
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample
  • TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample [Error message] [Debug log]
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample_update [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
Contributor Author

@PerlMonker303 PerlMonker303 left a comment

Choose a reason for hiding this comment

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

Addressed feedback. Thank you for pointing these aspects out. They improve the quality of the code.

@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, 159 insertions(+))
google-beta provider: Diff ( 5 files changed, 851 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 96 insertions(+))

Missing test report

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

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

resource "google_gemini_gemini_gcp_enablement_setting_binding" "primary" {
  labels = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 11
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • gemini

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGeminiGeminiGcpEnablementSettingBinding_geminiGeminiGcpEnablementSettingBindingBasicExample_update [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

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