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

Adding support for Access Context Manager's VPC Sub-segmentation feature #8989

Closed
wants to merge 16 commits into from

Conversation

vmoros
Copy link
Contributor

@vmoros vmoros commented Sep 18, 2023

Moving changes for Access Context Manager's VPC Sub-segmentation feature from Terraform EAP to the normal provider.

Here is the PR that added these same fields to Terraform EAP.

Here are the new fields for Service Perimeters, so this PR adds these new fields (and associated sub-fields) to various Service Perimeter-related tests and resource files.

Similarly, here is the new field for Access Levels. This PR adds this new field (and associated sub-fields) to various Access Level-related tests and resource files.

Release Note Template for Downstream PRs (will be copied)

Adding support for Access Context Manager's VPC Sub-segmentation feature

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

@vmoros vmoros changed the title First commit for VPC sub-segmentation feature. All relevant resources… Adding support for Access Context Manager's VPC Sub-segmentation feature Sep 18, 2023
@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 ( 18 files changed, 1241 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1241 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3065
Passed tests 2765
Skipped tests: 299
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
TestAccAccessContextManager

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAccessContextManager[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 ( 18 files changed, 1241 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1241 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

…moving a VPC network to the top level instead of (incorrectly) inside another resource.
@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 ( 18 files changed, 1254 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1254 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3069
Passed tests 2768
Skipped tests: 299
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
TestAccAccessContextManager|TestAccDataprocJobIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataprocJobIamPolicy[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:}}$
TestAccAccessContextManager[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 ( 18 files changed, 1254 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1254 insertions(+), 13 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3069
Passed tests 2769
Skipped tests: 299
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
TestAccAccessContextManager

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Breaking Change Detection Failed

The breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer.

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 18 files changed, 1378 insertions(+), 102 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1378 insertions(+), 102 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

@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 ( 18 files changed, 1244 insertions(+), 9 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1244 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_access_level_condition" "primary" {
  vpc_network_sources {
    vpc_subnetwork {
      network            = # value needed
      vpc_ip_subnetworks = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@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 ( 18 files changed, 1243 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 17 files changed, 1243 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_access_level_condition" "primary" {
  vpc_network_sources {
    vpc_subnetwork {
      network            = # value needed
      vpc_ip_subnetworks = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3070
Passed tests 2767
Skipped tests: 300
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
TestAccAccessContextManager|TestAccDataSourceGoogleServiceAccountJwt|TestAccProjectIamPolicy_invalidMembers

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataSourceGoogleServiceAccountJwt[Debug log]
TestAccProjectIamPolicy_invalidMembers[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:}}$
TestAccAccessContextManager[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 ( 18 files changed, 1254 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1254 insertions(+), 13 deletions(-))
TF Conversion: Diff ( 4 files changed, 346 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
          resource     = # value needed
        }
      }
    }
  }
  status {
    egress_policies {
      egress_from {
        sources {
          resource = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
      resource     = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
            resource     = # value needed
          }
        }
      }
    }
    status {
      egress_policies {
        egress_from {
          sources {
            resource = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3092
Passed tests 2792
Skipped tests: 299
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
TestAccAccessContextManager

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

… from the API returns. Also removing the 'resource' field because it's behind an allowlist.
@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 ( 18 files changed, 1119 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1119 insertions(+), 13 deletions(-))
TF Conversion: Diff ( 4 files changed, 302 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3089
Passed tests 2785
Skipped tests: 299
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAccessContextManager|TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigQueryDataTable_bigtable[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[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:}}$
TestAccAccessContextManager[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 ( 18 files changed, 1138 insertions(+), 21 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1138 insertions(+), 21 deletions(-))
TF Conversion: Diff ( 4 files changed, 302 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_access_level_condition" "primary" {
  vpc_network_sources {
    vpc_subnetwork {
      network            = # value needed
      vpc_ip_subnetworks = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3097
Passed tests 2786
Skipped tests: 310
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
TestAccContainerCluster_withAddons

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerCluster_withAddons[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 ( 18 files changed, 1138 insertions(+), 22 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1138 insertions(+), 22 deletions(-))
TF Conversion: Diff ( 4 files changed, 302 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3101
Passed tests 2783
Skipped tests: 313
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAccessContextManager|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccContainerCluster_withAddons|TestAccHealthcareDatasetIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAccessContextManager[Debug log]
TestAccHealthcareDatasetIamPolicy[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:}}$
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerCluster_withAddons[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

@vmoros vmoros marked this pull request as ready for review September 29, 2023 11:58
@vmoros
Copy link
Contributor Author

vmoros commented Sep 29, 2023

Hi @SarahFrench, I see that the missing test report says that source_restriction and access_level are not tested but they are tested. For example, both fields are tested here for the ServicePerimeter resource, and similarly for the other Service Perimeter-related resources.

How can I get the missing test report to recognize these tests?

@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 ( 18 files changed, 1139 insertions(+), 23 deletions(-))
Terraform Beta: Diff ( 18 files changed, 1139 insertions(+), 23 deletions(-))
TF Conversion: Diff ( 4 files changed, 302 insertions(+))

Missing test report

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

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

resource "google_access_context_manager_service_perimeter" "primary" {
  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
        }
      }
    }
  }
}

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

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    source_restriction = # value needed
    sources {
      access_level = # value needed
    }
  }
}

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

resource "google_access_context_manager_service_perimeters" "primary" {
  service_perimeters {
    spec {
      egress_policies {
        egress_from {
          source_restriction = # value needed
          sources {
            access_level = # value needed
          }
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3101
Passed tests 2784
Skipped tests: 313
Affected tests: 4

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
TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccContainerCluster_withAddons|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{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerCluster_withAddons[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

@SarahFrench
Copy link
Collaborator

Hi @SarahFrench, I see that the missing test report says that source_restriction and access_level are not tested but they are tested. For example, both fields are tested here for the ServicePerimeter resource, and similarly for the other Service Perimeter-related resources.

How can I get the missing test report to recognize these tests?

This might be a sign that the config defined in these tests is malformed somehow.

This message says that a test for google_access_context_manager_service_perimeter should include:

  spec {
    egress_policies {
      egress_from {
        source_restriction = # value needed
        sources {
          access_level = # value needed
        }
      }
    }
  }

I took the code you linked to and opened it in an IDE and it looks like instead of defining those fields in google_access_context_manager_service_perimeter.spec.egress_policies. egress_from.* they are currently defined in google_access_context_manager_service_perimeter.status.egress_policies. egress_from.*

Screenshot 2023-10-03 at 15 52 49

@SarahFrench
Copy link
Collaborator

SarahFrench commented Oct 3, 2023

Ah, my apologies, it looks like you're also adding fields that are called the same thing and nested under the status field.

I think you need to add the new source_restriction and sources fields to these sections within the google_access_context_manager_service_perimeter tests, under the spec field:

egress_policies {
egress_from {
identity_type = "ANY_USER_ACCOUNT"
}
egress_to {
operations {
service_name = "bigquery.googleapis.com"
method_selectors {
permission = "externalResource.read"
}
}
external_resources = ["s3://bucket1"]
}
}
egress_policies {
egress_from {
identities = ["user:test@google.com"]
}
egress_to {
resources = ["*"]
}
}

Copy link
Collaborator

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Given the repetitive nature of these new fields and the confusion with acceptance tests, could you please split this PR into multiple PRs?

Copy link

@vmoros, 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 14 days.

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

@SarahFrench
Copy link
Collaborator

Superseded by #9298

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