From b93158a50ffd05e5ee617be540c3f7090425cb9d Mon Sep 17 00:00:00 2001 From: Mauricio Alvarez Leon <65101411+BBBmau@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:13:08 -0800 Subject: [PATCH] `CI`: require `Ephemeral` Tests to use `1.10` + add `1.10` TF into CI (#2642) * require ephemeral tests to only run on 1.10 * include 1.10.1 in acceptance tests workflows * use SkipBelow instead of require --- .github/workflows/acceptance_tests_aks.yaml | 2 +- .github/workflows/acceptance_tests_eks.yaml | 2 +- .github/workflows/acceptance_tests_gke.yaml | 2 +- .github/workflows/acceptance_tests_kind.yaml | 4 ++-- .github/workflows/check_examples.yaml | 1 + .../authenticationv1/ephemeral_token_request_v1_test.go | 4 ++++ .../ephemeral_certificate_signing_request_v1_test.go | 4 ++++ 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/acceptance_tests_aks.yaml b/.github/workflows/acceptance_tests_aks.yaml index 298fbd196a..0232d81482 100644 --- a/.github/workflows/acceptance_tests_aks.yaml +++ b/.github/workflows/acceptance_tests_aks.yaml @@ -29,7 +29,7 @@ on: env: KUBE_CONFIG_PATH: ${{ github.workspace }}/kubernetes/test-infra/aks/kubeconfig - TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION }} + TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION || '1.10.1' }} PARALLEL_RUNS: ${{ github.event.inputs.parallelRuns || vars.PARALLEL_RUNS }} TF_VAR_location: ${{ github.event.inputs.location || vars.AZURE_LOCATION }} TF_VAR_node_count: ${{ github.event.inputs.nodeCount || vars.AZURE_NODE_COUNT }} diff --git a/.github/workflows/acceptance_tests_eks.yaml b/.github/workflows/acceptance_tests_eks.yaml index e858641aae..abe2053775 100644 --- a/.github/workflows/acceptance_tests_eks.yaml +++ b/.github/workflows/acceptance_tests_eks.yaml @@ -34,7 +34,7 @@ env: AWS_REGION: ${{ github.event.inputs.region || vars.AWS_REGION }} KUBE_CONFIG_PATH: ${{ github.workspace }}/kubernetes/test-infra/eks/kubeconfig PARALLEL_RUNS: ${{ github.event.inputs.parallelRuns || vars.PARALLEL_RUNS }} - TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION }} + TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION || '1.10.1' }} TF_VAR_az_span: ${{ github.event.inputs.azSpan || vars.AWS_AZ_NUMBER }} TF_VAR_capacity_type: ${{ vars.AWS_CAPACITY_TYPE }} TF_VAR_cluster_version: ${{ github.event.inputs.clusterVersion || vars.CLUSTER_VERSION }} diff --git a/.github/workflows/acceptance_tests_gke.yaml b/.github/workflows/acceptance_tests_gke.yaml index ad3c56d1fd..047f982a4e 100644 --- a/.github/workflows/acceptance_tests_gke.yaml +++ b/.github/workflows/acceptance_tests_gke.yaml @@ -37,7 +37,7 @@ env: USE_GKE_GCLOUD_AUTH_PLUGIN: True KUBE_CONFIG_PATH: ${{ github.workspace }}/kubernetes/test-infra/gke/kubeconfig PARALLEL_RUNS: ${{ github.event.inputs.parallelRuns || vars.PARALLEL_RUNS }} - TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION }} + TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION || '1.10.1' }} TF_VAR_cluster_version: ${{ github.event.inputs.clusterVersion || vars.CLUSTER_VERSION }} TF_VAR_node_count: ${{ github.event.inputs.nodeCount || vars.GOOGLE_NODE_COUNT }} TF_VAR_instance_type: ${{ github.event.inputs.instanceType || vars.GOOGLE_INSTANCE_TYPE }} diff --git a/.github/workflows/acceptance_tests_kind.yaml b/.github/workflows/acceptance_tests_kind.yaml index 2f29a0b711..f4779af2e1 100644 --- a/.github/workflows/acceptance_tests_kind.yaml +++ b/.github/workflows/acceptance_tests_kind.yaml @@ -11,7 +11,7 @@ on: default: "^TestAcc" terraformVersion: description: Terraform version - default: 1.10.0-rc3 # FIXME update this once 1.10 goes out + default: 1.10.1 parallelRuns: description: The maximum number of tests to run simultaneously default: 8 @@ -29,7 +29,7 @@ env: KUBECONFIG: ${{ github.workspace }}/.kube/config KIND_VERSION: ${{ github.event.inputs.kindVersion || vars.KIND_VERSION || '0.25.0' }} PARALLEL_RUNS: ${{ github.event.inputs.parallelRuns || vars.PARALLEL_RUNS || '8' }} - TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION || '1.10.0-rc3' }} + TERRAFORM_VERSION: ${{ github.event.inputs.terraformVersion || vars.TERRAFORM_VERSION || '1.10.1' }} jobs: acceptance_tests_kind: diff --git a/.github/workflows/check_examples.yaml b/.github/workflows/check_examples.yaml index b92a967f0d..e61e839e36 100644 --- a/.github/workflows/check_examples.yaml +++ b/.github/workflows/check_examples.yaml @@ -32,6 +32,7 @@ jobs: - "1.6.0" - "1.7.0" - "1.8.0" + - "1.10.1" env: TF_X_KUBERNETES_MANIFEST_RESOURCE: 1 TERM: linux diff --git a/internal/framework/provider/authenticationv1/ephemeral_token_request_v1_test.go b/internal/framework/provider/authenticationv1/ephemeral_token_request_v1_test.go index 07a5595f78..70ab04420a 100644 --- a/internal/framework/provider/authenticationv1/ephemeral_token_request_v1_test.go +++ b/internal/framework/provider/authenticationv1/ephemeral_token_request_v1_test.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/knownvalue" "github.com/hashicorp/terraform-plugin-testing/statecheck" "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" ) func TestAccEpehemeralTokenRequest_basic(t *testing.T) { @@ -18,6 +19,9 @@ func TestAccEpehemeralTokenRequest_basic(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_10_0), + }, Steps: []resource.TestStep{ { Config: testEphemeralTokenRequestV1Config(name, namespace), diff --git a/internal/framework/provider/certificatesv1/ephemeral_certificate_signing_request_v1_test.go b/internal/framework/provider/certificatesv1/ephemeral_certificate_signing_request_v1_test.go index 7fcebf7f1e..c6777de284 100644 --- a/internal/framework/provider/certificatesv1/ephemeral_certificate_signing_request_v1_test.go +++ b/internal/framework/provider/certificatesv1/ephemeral_certificate_signing_request_v1_test.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/knownvalue" "github.com/hashicorp/terraform-plugin-testing/statecheck" "github.com/hashicorp/terraform-plugin-testing/tfjsonpath" + "github.com/hashicorp/terraform-plugin-testing/tfversion" ) func TestAccEpehemeralCertificateSigningRequest_basic(t *testing.T) { @@ -17,6 +18,9 @@ func TestAccEpehemeralCertificateSigningRequest_basic(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, + TerraformVersionChecks: []tfversion.TerraformVersionCheck{ + tfversion.SkipBelow(tfversion.Version1_10_0), + }, Steps: []resource.TestStep{ { Config: testEphemeralCertificateSigningRequestRequestV1Config(name),