From 89ec991ee939afc171d0a2c5ec5d07e9a12a0c88 Mon Sep 17 00:00:00 2001 From: Ian Saultz <52051793+atierian@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:52:00 -0500 Subject: [PATCH] test: exclude unsupported ap-northeast-3 region for PredictionsTransformerV2 E2E test --- codebuild_specs/e2e_workflow.yml | 63 ++++++++++++++++++-------------- scripts/split-e2e-tests.ts | 12 ++++++ 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/codebuild_specs/e2e_workflow.yml b/codebuild_specs/e2e_workflow.yml index 07ce4961b7..46932f70a9 100644 --- a/codebuild_specs/e2e_workflow.yml +++ b/codebuild_specs/e2e_workflow.yml @@ -1718,99 +1718,108 @@ batch: depend-on: - publish_to_local_registry - identifier: >- - NonModelAuthV2Function_TransformerOptionsV2_PredictionsTransformerV2Tests_DefaultValueTransformer_PerFieldAuthV2TransformerWith + NonModelAuthV2Function_TransformerOptionsV2_DefaultValueTransformer_PerFieldAuthV2TransformerWithFF_PerFieldAuthV2Transformer buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/NonModelAuthV2Function.e2e.test.ts|src/__tests__/TransformerOptionsV2.e2e.test.ts|src/__tests__/PredictionsTransformerV2Tests.e2e.test.ts|src/__tests__/DefaultValueTransformer.e2e.test.ts|src/__tests__/PerFieldAuthV2TransformerWithFF.e2e.test.ts - CLI_REGION: ap-northeast-3 + src/__tests__/NonModelAuthV2Function.e2e.test.ts|src/__tests__/TransformerOptionsV2.e2e.test.ts|src/__tests__/DefaultValueTransformer.e2e.test.ts|src/__tests__/PerFieldAuthV2TransformerWithFF.e2e.test.ts|src/__tests__/PerFieldAuthV2Transformer.e2e.test.ts + CLI_REGION: ap-south-1 depend-on: - publish_to_local_registry - identifier: >- - PerFieldAuthV2Transformer_BelongsToTransformerV2_RelationalWithAuthV2WithFF_IndexWithAuthV2_IndexWithAuthV2WithFF + BelongsToTransformerV2_RelationalWithAuthV2WithFF_IndexWithAuthV2_IndexWithAuthV2WithFF_SubscriptionsWithAuthV2WithFF buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/PerFieldAuthV2Transformer.e2e.test.ts|src/__tests__/BelongsToTransformerV2.e2e.test.ts|src/__tests__/RelationalWithAuthV2WithFF.e2e.test.ts|src/__tests__/IndexWithAuthV2.e2e.test.ts|src/__tests__/IndexWithAuthV2WithFF.e2e.test.ts - CLI_REGION: ap-south-1 + src/__tests__/BelongsToTransformerV2.e2e.test.ts|src/__tests__/RelationalWithAuthV2WithFF.e2e.test.ts|src/__tests__/IndexWithAuthV2.e2e.test.ts|src/__tests__/IndexWithAuthV2WithFF.e2e.test.ts|src/__tests__/SubscriptionsWithAuthV2WithFF.e2e.test.ts + CLI_REGION: ap-southeast-1 depend-on: - publish_to_local_registry - identifier: >- - SubscriptionsWithAuthV2WithFF_MultiAuthV2Transformer_ModelTransformer_SubscriptionsWithAuthV2_RelationalWithAuthV2 + MultiAuthV2Transformer_ModelTransformer_SubscriptionsWithAuthV2_RelationalWithAuthV2_MapsToTransformer buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/SubscriptionsWithAuthV2WithFF.e2e.test.ts|src/__tests__/MultiAuthV2Transformer.e2e.test.ts|src/__tests__/ModelTransformer.e2e.test.ts|src/__tests__/SubscriptionsWithAuthV2.e2e.test.ts|src/__tests__/RelationalWithAuthV2.e2e.test.ts - CLI_REGION: ap-southeast-1 + src/__tests__/MultiAuthV2Transformer.e2e.test.ts|src/__tests__/ModelTransformer.e2e.test.ts|src/__tests__/SubscriptionsWithAuthV2.e2e.test.ts|src/__tests__/RelationalWithAuthV2.e2e.test.ts|src/__tests__/MapsToTransformer.e2e.test.ts + CLI_REGION: ap-southeast-2 depend-on: - publish_to_local_registry - identifier: >- - MapsToTransformer_MultiAuthV2TransformerWithFF_AuthV2Transformer_AuthV2ExhaustiveT1B_AuthV2ExhaustiveT1A + MultiAuthV2TransformerWithFF_AuthV2Transformer_AuthV2ExhaustiveT1B_AuthV2ExhaustiveT1A_AuthV2TransformerWithFF buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/MapsToTransformer.e2e.test.ts|src/__tests__/MultiAuthV2TransformerWithFF.e2e.test.ts|src/__tests__/AuthV2Transformer.e2e.test.ts|src/__tests__/AuthV2ExhaustiveT1B.test.ts|src/__tests__/AuthV2ExhaustiveT1A.test.ts - CLI_REGION: ap-southeast-2 + src/__tests__/MultiAuthV2TransformerWithFF.e2e.test.ts|src/__tests__/AuthV2Transformer.e2e.test.ts|src/__tests__/AuthV2ExhaustiveT1B.test.ts|src/__tests__/AuthV2ExhaustiveT1A.test.ts|src/__tests__/AuthV2TransformerWithFF.e2e.test.ts + CLI_REGION: ca-central-1 depend-on: - publish_to_local_registry - identifier: >- - AuthV2TransformerWithFF_SubscriptionsRuntimeFiltering_AuthV2ExhaustiveT2A_AuthV2ExhaustiveT1C_AuthV2ExhaustiveT1D + SubscriptionsRuntimeFiltering_AuthV2ExhaustiveT2A_AuthV2ExhaustiveT1C_AuthV2ExhaustiveT1D_AuthV2ExhaustiveT2B buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/AuthV2TransformerWithFF.e2e.test.ts|src/__tests__/SubscriptionsRuntimeFiltering.e2e.test.ts|src/__tests__/AuthV2ExhaustiveT2A.test.ts|src/__tests__/AuthV2ExhaustiveT1C.test.ts|src/__tests__/AuthV2ExhaustiveT1D.test.ts - CLI_REGION: ca-central-1 + src/__tests__/SubscriptionsRuntimeFiltering.e2e.test.ts|src/__tests__/AuthV2ExhaustiveT2A.test.ts|src/__tests__/AuthV2ExhaustiveT1C.test.ts|src/__tests__/AuthV2ExhaustiveT1D.test.ts|src/__tests__/AuthV2ExhaustiveT2B.test.ts + CLI_REGION: eu-central-1 depend-on: - publish_to_local_registry - identifier: >- - AuthV2ExhaustiveT2B_AuthV2ExhaustiveT2D_AuthV2ExhaustiveT2C_RelationalWithAuthV2Redacted_RelationalWithAuthV2NonRedacted + AuthV2ExhaustiveT2D_AuthV2ExhaustiveT2C_RelationalWithAuthV2Redacted_RelationalWithAuthV2NonRedacted_AuthV2TransformerIAM buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/AuthV2ExhaustiveT2B.test.ts|src/__tests__/AuthV2ExhaustiveT2D.test.ts|src/__tests__/AuthV2ExhaustiveT2C.test.ts|src/__tests__/RelationalWithAuthV2Redacted.e2e.test.ts|src/__tests__/RelationalWithAuthV2NonRedacted.e2e.test.ts - CLI_REGION: eu-central-1 + src/__tests__/AuthV2ExhaustiveT2D.test.ts|src/__tests__/AuthV2ExhaustiveT2C.test.ts|src/__tests__/RelationalWithAuthV2Redacted.e2e.test.ts|src/__tests__/RelationalWithAuthV2NonRedacted.e2e.test.ts|src/__tests__/AuthV2TransformerIAM.test.ts + CLI_REGION: eu-north-1 depend-on: - publish_to_local_registry - identifier: >- - AuthV2TransformerIAM_AuthV2ExhaustiveT3D_AuthV2ExhaustiveT3C_AuthV2ExhaustiveT3B_AuthV2ExhaustiveT3A + AuthV2ExhaustiveT3D_AuthV2ExhaustiveT3C_AuthV2ExhaustiveT3B_AuthV2ExhaustiveT3A_SearchableModelTransformerV2 buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/AuthV2TransformerIAM.test.ts|src/__tests__/AuthV2ExhaustiveT3D.test.ts|src/__tests__/AuthV2ExhaustiveT3C.test.ts|src/__tests__/AuthV2ExhaustiveT3B.test.ts|src/__tests__/AuthV2ExhaustiveT3A.test.ts - CLI_REGION: eu-north-1 + src/__tests__/AuthV2ExhaustiveT3D.test.ts|src/__tests__/AuthV2ExhaustiveT3C.test.ts|src/__tests__/AuthV2ExhaustiveT3B.test.ts|src/__tests__/AuthV2ExhaustiveT3A.test.ts|src/__tests__/SearchableModelTransformerV2.e2e.test.ts + CLI_REGION: eu-west-2 depend-on: - publish_to_local_registry - - identifier: >- - SearchableModelTransformerV2_SearchableWithAuthV2WithFF_SearchableWithAuthV2 + - identifier: SearchableWithAuthV2WithFF_SearchableWithAuthV2 buildspec: codebuild_specs/graphql_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE variables: NODE_OPTIONS: '--max-old-space-size=14848' TEST_SUITE: >- - src/__tests__/SearchableModelTransformerV2.e2e.test.ts|src/__tests__/SearchableWithAuthV2WithFF.e2e.test.ts|src/__tests__/SearchableWithAuthV2.e2e.test.ts - CLI_REGION: eu-west-2 + src/__tests__/SearchableWithAuthV2WithFF.e2e.test.ts|src/__tests__/SearchableWithAuthV2.e2e.test.ts + CLI_REGION: eu-west-3 + depend-on: + - publish_to_local_registry + - identifier: PredictionsTransformerV2Tests + buildspec: codebuild_specs/graphql_e2e_tests.yml + env: + compute-type: BUILD_GENERAL1_MEDIUM + variables: + NODE_OPTIONS: '--max-old-space-size=6656' + TEST_SUITE: src/__tests__/PredictionsTransformerV2Tests.e2e.test.ts + CLI_REGION: ap-northeast-2 depend-on: - publish_to_local_registry - identifier: FunctionTransformerTestsV2 @@ -1820,7 +1829,7 @@ batch: variables: NODE_OPTIONS: '--max-old-space-size=6656' TEST_SUITE: src/__tests__/FunctionTransformerTestsV2.e2e.test.ts - CLI_REGION: ap-northeast-3 + CLI_REGION: ap-south-1 USE_PARENT_ACCOUNT: 1 depend-on: - publish_to_local_registry @@ -1831,7 +1840,7 @@ batch: variables: NODE_OPTIONS: '--max-old-space-size=6656' TEST_SUITE: src/__tests__/HttpTransformerV2.e2e.test.ts - CLI_REGION: ap-northeast-3 + CLI_REGION: ap-south-1 depend-on: - publish_to_local_registry - identifier: cleanup_e2e_resources diff --git a/scripts/split-e2e-tests.ts b/scripts/split-e2e-tests.ts index eb5fae64f0..d2879ff624 100644 --- a/scripts/split-e2e-tests.ts +++ b/scripts/split-e2e-tests.ts @@ -154,6 +154,8 @@ const RUN_SOLO: (string | RegExp)[] = [ 'src/__tests__/generations/generation.test.ts', // Conversation tests 'src/__tests__/conversations/conversation.test.ts', + // Predictions tests + 'src/__tests__/PredictionsTransformerV2Tests.e2e.test.ts', ]; const RUN_IN_ALL_REGIONS = [ @@ -184,6 +186,11 @@ const RUN_IN_COGNITO_REGIONS: (string | RegExp)[] = [ /src\/__tests__\/AuthV2ExhaustiveT3C.test.ts/, ]; +const TEST_REGION_EXCLUSIONS: Record = { + // Rekognition is not supported in ap-northeast-3 + 'src/__tests__/PredictionsTransformerV2Tests.e2e.test.ts': ['ap-northeast-3'], +}; + const RUN_IN_V1_TRANSFORMER_REGIONS = ['src/__tests__/schema-searchable.test.ts']; const DEBUG_FLAG = '--debug'; @@ -350,6 +357,11 @@ const setJobRegion = (test: string, job: CandidateJob, jobIdx: number, useBetaLa const filterCandidateRegions = (test: string, candidateRegions: string[], useBetaLayer: boolean): string[] => { let resolvedRegions = [...candidateRegions]; + const excludedRegions = TEST_REGION_EXCLUSIONS[test]; + if (excludedRegions) { + resolvedRegions = resolvedRegions.filter((region) => !excludedRegions.includes(region)); + } + // Parent E2E account does not have opt-in regions. Choose non-opt-in region. const shouldUseParentAccount = USE_PARENT_ACCOUNT.some((usesParent) => test.startsWith(usesParent));