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

bumping enforce on key configs for google_compute_security_policy to GA #12318

Merged

Conversation

maxi-cit
Copy link
Contributor

@maxi-cit maxi-cit commented Nov 13, 2024

Fixes : hashicorp/terraform-provider-google#14738

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: added `rule.rate_limit_options.enforce_on_key_configs` field to `google_compute_security_policy` resource (GA)

@github-actions github-actions bot requested a review from shuyama1 November 13, 2024 16:15
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer 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 service/compute-security-policy and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Nov 13, 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 ( 2 files changed, 366 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1060
Passed tests: 986
Skipped tests: 73
Affected tests: 1

Click here to see the affected service packages
  • compute
#### Non-exercised tests

🔴 Tests were added that are GA-only additions and require manual runs:

  • TestAccComputeSecurityPolicy_EnforceOnKeyUpdates
  • TestAccComputeSecurityPolicy_withRateLimitOption_withMultipleEnforceOnKeyConfigs
  • TestAccComputeSecurityPolicy_withRateLimit_withEnforceOnKeyConfigs

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy [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

@github-actions github-actions bot requested a review from shuyama1 November 21, 2024 15:18
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 21, 2024
@maxi-cit
Copy link
Contributor Author

Hello @shuyama1, could you run test on GA please?

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 22, 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 ( 2 files changed, 410 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1064
Passed tests: 990
Skipped tests: 73
Affected tests: 1

Click here to see the affected service packages
  • compute
#### Non-exercised tests

🔴 Tests were added that are GA-only additions and require manual runs:

  • TestAccComputeSecurityPolicy_EnforceOnKeyUpdates
  • TestAccComputeSecurityPolicy_withRateLimitOption_withMultipleEnforceOnKeyConfigs
  • TestAccComputeSecurityPolicy_withRateLimit_withEnforceOnKeyConfigs

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@shuyama1
Copy link
Member

Triggered GA tests on TC

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.

One of the GA test TestAccComputeSecurityPolicy_EnforceOnKeyUpdates failed due to

=== CONT  TestAccComputeSecurityPolicy_EnforceOnKeyUpdates
    resource_compute_security_policy_test.go:474: Step 7/12 error: Error running apply: exit status 1
        Error: Error updating SecurityPolicy "tf-test-geowgj4z7j": googleapi: Error 400: Invalid value for field 'resource.rateLimitOptions.enforceOnKeyConfigs': ''. Only one of enforceOnKey and enforceOnKeyConfigs can be specified., invalid
          with google_compute_security_policy.policy,
          on terraform_plugin_test.tf line 2, in resource "google_compute_security_policy" "policy":
           2: resource "google_compute_security_policy" "policy" {
--- FAIL: TestAccComputeSecurityPolicy_EnforceOnKeyUpdates (71.93s)

I just checked our nightly integration test and it seems the test passes consistently in beta for the past three months. So I'm not sure why it's failing in GA. Triggering another run on TC to see if it fails again.

Also, you'll want to remove the beta flag in the documentation at https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/website/docs/r/compute_security_policy.html.markdown?plain=1#L361

@shuyama1
Copy link
Member

Test status update: TestAccComputeSecurityPolicy_EnforceOnKeyUpdates still failed with same error.

@github-actions github-actions bot requested a review from shuyama1 December 4, 2024 16:14
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 4, 2024
@maxi-cit
Copy link
Contributor Author

maxi-cit commented Dec 4, 2024

Hello @shuyama1, sry for the late reply. I found there was an additional conditional at the update func who was changing the behaviour between GA and Beta.

All tests should be fine now. Could you give it a check and rerun tests once more please?

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 4, 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 ( 2 files changed, 448 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1071
Passed tests: 998
Skipped tests: 73
Affected tests: 0

Click here to see the affected service packages
  • compute
#### Non-exercised tests

🔴 Tests were added that are GA-only additions and require manual runs:

  • TestAccComputeSecurityPolicy_EnforceOnKeyUpdates
  • TestAccComputeSecurityPolicy_withRateLimitOption_withMultipleEnforceOnKeyConfigs
  • TestAccComputeSecurityPolicy_withRateLimit_withEnforceOnKeyConfigs
    🟢 All tests passed!

View the build log

@shuyama1
Copy link
Member

shuyama1 commented Dec 4, 2024

Running GA tests on TC

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.

GA tests passed. LGTM. Thank you!

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.

Error 409 when trying to update the resource google_compute_security_policy
3 participants