magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

fix failing posture test

Open snpd25 opened this issue 1 year ago • 2 comments

Release Note Template for Downstream PRs (will be copied)


snpd25 avatar Feb 29 '24 06:02 snpd25

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.

github-actions[bot] avatar Feb 29 '24 06:02 github-actions[bot]

/gcbrun

roaks3 avatar Feb 29 '24 22:02 roaks3

Hi @roaks3, it doesn't seem clear to me as why the test is failing, can you please take a look

snpd25 avatar Mar 02 '24 11:03 snpd25

Hmm, sorry I didn't notice the issue here. We have been making some changes that affect the checks for our PRs, and sometimes a re-run or rebase is required.

I'll try to kick the jobs again, but if that doesn't work, I think you'll need to rebase the PR.

roaks3 avatar Mar 05 '24 22:03 roaks3

/gcbrun

roaks3 avatar Mar 05 '24 22:03 roaks3

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.

Terraform GA: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-))

modular-magician avatar Mar 05 '24 22:03 modular-magician

Tests analytics

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

Click here to see the affected service packages
  • securityposture

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
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample

Get to know how VCR tests work

modular-magician avatar Mar 05 '24 22:03 modular-magician

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

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


$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test

modular-magician avatar Mar 05 '24 22:03 modular-magician

Tests pass and I see nothing wrong, but I'm curious why this fixed the test. Would you mind sharing how this solved the problem (would also help for posterity)?

Actually we have two resources: Posture and PostureDeployment. Posture deployment depends on Posture thus its test also involves creation of a Posture. Both Posture and Posture Deployment are organization level resources. Earlier both the tests had the same name for Posture resource, thus when run in parallel, one of the tests gets the posture created successfully and the other gets already exist error. Thus, have changed the names to prevent the already exist error.

snpd25 avatar Mar 07 '24 03:03 snpd25

Makes sense, thank you! Will re-run checks after the rebase, then this should be good to merge.

roaks3 avatar Mar 07 '24 14:03 roaks3

/gcbrun

roaks3 avatar Mar 07 '24 14:03 roaks3

Oh, and so it looks like this might resolve https://github.com/hashicorp/terraform-provider-google/issues/17399 (or at least part of it)?

roaks3 avatar Mar 07 '24 14:03 roaks3

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.

Terraform GA: Diff ( 4 files changed, 8 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 4 files changed, 8 insertions(+), 8 deletions(-))

modular-magician avatar Mar 07 '24 14:03 modular-magician

Tests analytics

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

Click here to see the affected service packages
  • securityposture

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
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample|TestAccSecurityposturePosture_securityposturePostureBasicExample

Get to know how VCR tests work

modular-magician avatar Mar 07 '24 14:03 modular-magician

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

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


$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test

modular-magician avatar Mar 07 '24 14:03 modular-magician

Oh, and so it looks like this might resolve hashicorp/terraform-provider-google#17399 (or at least part of it)?

Yes

snpd25 avatar Mar 07 '24 14:03 snpd25