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

fixed flaky test TestAccSecurityCenterManagement #11756

Conversation

vijaykanthm
Copy link
Contributor

@vijaykanthm vijaykanthm commented Sep 19, 2024

This PR aims to fix the ETD Module failing test issue raised in #19086

References to the previous PR's worked on this:
#11469 & #11650
ETD Custom Module REST Doc link: https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/organizations.locations.eventThreatDetectionCustomModules

Release Note Template for Downstream PRs (will be copied)

securitycentermanagement: fixed flaky test TestAccSecurityCenterManagement

@github-actions github-actions bot requested a review from zli82016 September 19, 2024 16:53
Copy link

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

@zli82016, 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 ( 1 file changed, 3 insertions(+), 41 deletions(-))
google-beta provider: Diff ( 1 file changed, 5 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycentermanagement

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

View the build log

@zli82016
Copy link
Member

There are four test cases inside func TestAccSecurityCenterManagement.
The version guard is needed for this function and the four test cases.

That means for all of the four test files in the directory mmv1/third_party/terraform/services/securitycentermanagement, the version guard (<% unless version == 'ga' -%>) is needed at the top of the page.

Example

@zli82016 zli82016 changed the title Fix ETD Module failing tests issue 19086 fixed flaky test TestAccSecurityCenterManagement Sep 24, 2024
@github-actions github-actions bot requested a review from zli82016 September 24, 2024 18:32
@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 ( 4 files changed, 1 insertion(+), 673 deletions(-))
google-beta provider: Diff ( 1 file changed, 5 insertions(+), 6 deletions(-))

1 similar comment
@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 ( 4 files changed, 1 insertion(+), 673 deletions(-))
google-beta provider: Diff ( 1 file changed, 5 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycentermanagement

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

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycentermanagement

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

View the build log

@github-actions github-actions bot requested a review from zli82016 September 24, 2024 20:06
@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 ( 4 files changed, 789 deletions(-))
google-beta provider: Diff ( 4 files changed, 17 insertions(+), 9 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycentermanagement

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@c2thorn
Copy link
Member

c2thorn commented Sep 24, 2024

Hi @vijaykanthm

Tomorrow, the Magic Modules repository is scheduled to undergo a language migration from Ruby to Go. You can view more details about this in our announcement here: hashicorp/terraform-provider-google#19583 (or go/mm-migration-announcement if you are a Googler)

This open pull request may become incompatible due to most YAML and .erb files converting to Go-compatible files.

Our team (Magic Modules repository maintainers) has tooling to automatically convert changes to the new language, and we can prepare a new commit for this pull request that is compatible with the migration.

In order to push the new changes to your pull request, we would need to force push the commit to your fork's branch. Our tooling saves a backup branch before converting, so we could rollback or open a new pull request if needed. We would also work with you and the PR reviewer in the event additional changes are needed.

You also have the option to update the pull request yourself after the migration. You can view a preview branch and updated documentation related to the migration changes.

We will take no action until we have your explicit permission to push changes to your fork's branch used for this pull request. Let me or your reviewer know if you have any further questions!

@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 ( 4 files changed, 789 deletions(-))
google-beta provider: Diff ( 4 files changed, 20 insertions(+), 9 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • securitycentermanagement

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

View the build log

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM

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