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 Resource SCC V2 Project Nofitification Config #10964

Merged

Conversation

vijaykanthm
Copy link
Contributor

@vijaykanthm vijaykanthm commented Jun 14, 2024

Related to http://b/309603080.

Bug Description: hashicorp/terraform-provider-google#16427

Adding new template for SCC API V2 Project Notification Config
https://cloud.google.com/security-command-center/docs/reference/rest/v2/projects.locations.notificationConfigs

Release Note Template for Downstream PRs (will be copied)

`google_scc_v2_project_notification_config`

@github-actions github-actions bot requested a review from BBBmau June 14, 2024 06:16
Copy link

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

@BBBmau, 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 Jun 14, 2024
@vijaykanthm
Copy link
Contributor Author

Hi @BBBmau, can you please approve the trigger so that CI will continue the next steps. Thanks.

Copy link

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

@roaks3
Copy link
Contributor

roaks3 commented Jun 18, 2024

Heads up that #10817 is extremely related. I would ask that you please make every attempt to test this implementation locally, as I'm asking the other contributor to do, to avoid a high volume of requests to trigger CI runs.

Copy link

@GoogleCloudPlatform/terraform-team @BBBmau This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@roaks3
Copy link
Contributor

roaks3 commented Jun 21, 2024

@BBBmau Just to follow up on the above, I was able to follow up with this contributor over chat, and they were able to get their local setup working up to the point where the pubsub_topic needs to be created. Their test environment prevents topic creation for the moment, so they can't fully run these tests locally, and the manager of their environment is OOO for 2+ weeks.

That is to say, we will need to rely on CI runs (and manual approvals) for testing this PR.

@roaks3 roaks3 mentioned this pull request Jun 21, 2024
@modular-magician modular-magician added service/securitycenter and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jun 21, 2024
@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 ( 14 files changed, 1028 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 12 files changed, 1018 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 6859
Passed tests: 3425
Skipped tests: 376
Affected tests: 9

Click here to see the affected service packages

All service packages are affected

Action taken

Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy
  • TestAccFirebaseHostingChannel_firebasehostingChannelUpdate
  • TestAccFirebaseHostingSite_firebasehostingSiteBasicExample
  • TestAccFirebaseHostingSite_firebasehostingSiteFullExample
  • TestAccFirebaseHostingSite_firebasehostingSiteUpdate
  • TestAccFirebaseHostingVersion_firebasehostingVersionCloudFunctionsExample
  • TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationConfigBasicExample
  • TestAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy[Debug log]
TestAccFirebaseHostingChannel_firebasehostingChannelUpdate[Debug log]
TestAccFirebaseHostingSite_firebasehostingSiteBasicExample[Debug log]
TestAccFirebaseHostingSite_firebasehostingSiteFullExample[Debug log]
TestAccFirebaseHostingSite_firebasehostingSiteUpdate[Debug log]
TestAccFirebaseHostingVersion_firebasehostingVersionCloudFunctionsExample[Debug log]

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


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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@github-actions github-actions bot requested a review from BBBmau June 24, 2024 05:51
@vijaykanthm
Copy link
Contributor Author

Hey @BBBmau, can you please approve the trigger to run the next steps. 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.

google provider: Diff ( 14 files changed, 1028 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 12 files changed, 1018 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3825
Passed tests: 3443
Skipped tests: 378
Affected tests: 4

Click here to see the affected service packages

All service packages are affected

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationConfigBasicExample
  • TestAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]
TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationConfigBasicExample[Error message] [Debug log]
TestAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter[Error message] [Debug log]

$\textcolor{red}{\textsf{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

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

@vijaykanthm, this PR is waiting for action from you. Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

If no action is taken, this PR will be closed in 28 days.

This notification can be disabled with the disable-automatic-closure label.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 15, 2024
@vijaykanthm
Copy link
Contributor Author

Hi @BBBmau, can you please approve the trigger so that CI will continue the next steps. Thanks.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 18, 2024
@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 ( 8 files changed, 1030 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1020 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycenterv2

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
  • TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationConfigBasicExample
  • TestAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


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

$\textcolor{red}{\textsf{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 modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 18, 2024
@BBBmau BBBmau force-pushed the scc-v2-project-notification-config branch from f0b9804 to 7027630 Compare August 1, 2024 20:36
@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 1, 2024
@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 ( 8 files changed, 998 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 988 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

Missing test report

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

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

resource "google_scc_v2_project_notification_config" "primary" {
  project_id = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycenterv2

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
  • TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationConfigBasicExample
  • TestAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@github-actions github-actions bot requested a review from BBBmau August 2, 2024 00:05
@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 2, 2024
@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 ( 8 files changed, 1032 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1022 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycenterv2

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Copy link
Collaborator

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

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

Was able to take one last in-depth review of this now that tests are passing, these involve checking that the docs and PR match.

I noticed that streamingConfig is not marked as required, but based on the purpose of this new resource it's safe to assume that this streamingConfig is necessary.

function: 'validation.StringLenBetween(0, 1024)'
- !ruby/object:Api::Type::String
name: pubsubTopic
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking over the docs, it looks like it shouldn't be marked as required. Is their other documentation that supports having it be set to required? docs: https://cloud.google.com/security-command-center/docs/reference/rest/v2/projects.locations.notificationConfigs

Copy link
Contributor Author

@vijaykanthm vijaykanthm Aug 6, 2024

Choose a reason for hiding this comment

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

I don't think there is any other documentation and the current documentation also are vague which doesn't explicitly mention if they are required or not. Based on other contemporary config files I have put it as required, I can remove the field. Let me know if I can remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove it so that it matches the documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@github-actions github-actions bot requested a review from BBBmau August 6, 2024 01:55
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 6, 2024
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 6, 2024
@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 ( 7 files changed, 1023 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 6 files changed, 1022 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycenterv2

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Copy link
Collaborator

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

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

I appreciate your patience in regards to the requested changes, all looks good now!

@BBBmau BBBmau merged commit bcbb923 into GoogleCloudPlatform:main Aug 6, 2024
15 checks passed
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 12, 2024
BBBmau added a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 21, 2024
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.

4 participants