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

Update to wrap generated import format regex in ^ and $ #8913

Conversation

NickElliot
Copy link
Contributor

@NickElliot NickElliot commented Sep 11, 2023

Part of hashicorp/terraform-provider-google#14731

Currently generated import_format regex in TPG is not wrapped in start of line and end of line tokens, which allows for certain edge case false positives in non-standard import formats supplied via override.

Release Note Template for Downstream PRs (will be copied)

provider: fixed many import functions throughout the provider that matched a subset of the provided input when possible. Now, the GCP resource id supplied to "terraform import" must match exactly.

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

Terraform GA: Diff ( 220 files changed, 680 insertions(+), 680 deletions(-))
Terraform Beta: Diff ( 275 files changed, 852 insertions(+), 852 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3008
Passed tests 2703
Skipped tests: 302
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeVpnTunnel_regionFromGateway|TestAccCoreBillingProjectInfo_billingProjectInfoBasicExample|TestAccBillingProjectInfo_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Please fix these 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.

Terraform GA: Diff ( 225 files changed, 689 insertions(+), 690 deletions(-))
Terraform Beta: Diff ( 280 files changed, 861 insertions(+), 862 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3035
Passed tests 2728
Skipped tests: 304
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCoreBillingProjectInfo_billingProjectInfoBasicExample|TestAccBillingProjectInfo_update|TestAccGkeonpremBareMetalCluster_bareMetalClusterUpdateBasic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these 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.

Terraform GA: Diff ( 227 files changed, 692 insertions(+), 695 deletions(-))
Terraform Beta: Diff ( 282 files changed, 864 insertions(+), 867 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3035
Passed tests 2729
Skipped tests: 304
Affected tests: 2

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
TestAccBillingProjectInfo_update|TestAccSpannerDatabaseIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@NickElliot NickElliot marked this pull request as ready for review September 16, 2023 00:39
@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.

Terraform GA: Diff ( 227 files changed, 692 insertions(+), 695 deletions(-))
Terraform Beta: Diff ( 282 files changed, 864 insertions(+), 867 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3035
Passed tests 2730
Skipped tests: 304
Affected tests: 1

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
TestAccDataSourceGoogleServiceAccountJwt

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

LGTM- edited out "Fixes" In the parent since we'll need to add an upgrade guide as well, and proposed a changelog entry.

@@ -31,7 +31,6 @@ func TestAccComputeVpnTunnel_regionFromGateway(t *testing.T) {
ResourceName: "google_compute_vpn_tunnel.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateIdPrefix: fmt.Sprintf("%s/%s/", envvar.GetTestProjectFromEnv(), region),
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants