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

test: exclude unsupported region for PredictionsTransformerV2 E2E #3041

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

atierian
Copy link
Member

@atierian atierian commented Nov 20, 2024

Problem

The PredictionsTransformerV2Tests E2E test case always passes locally buy has consistently failed in CI for a while now with the error:

    TypeError: Invalid URL
      18 |
      19 |   async query(query: string, variables: any = {}): Promise<GraphQLResponse> {
    > 20 |     const axRes = await axios.post<GraphQLResponse>(
         |                               ^
      21 |       this.url,
      22 |       {
      23 |         query,
      at dispatchHttpRequest (../../node_modules/axios/lib/adapters/http.js:232:20)
      at ../../node_modules/axios/lib/adapters/http.js:152:5
      at wrapAsync (../../node_modules/axios/lib/adapters/http.js:132:10)
      at http (../../node_modules/axios/lib/adapters/http.js:170:10)
      at Axios.dispatchRequest (../../node_modules/axios/lib/core/dispatchRequest.js:51:10)
      at Axios._request (../../node_modules/axios/lib/core/Axios.js:173:33)
      at Axios.request (../../node_modules/axios/lib/core/Axios.js:40:25)
      at Axios.httpMethod [as post] (../../node_modules/axios/lib/core/Axios.js:212:19)
      at Function.wrap (../../node_modules/axios/lib/helpers/bind.js:5:15)
      at GraphQLClient.query (src/GraphQLClient.ts:20:31)
      at Object.<anonymous> (src/__tests__/PredictionsTransformerV2Tests.e2e.test.ts:173:41)

This happens because our current e2e_workflow.yml has this test running in ap-northeast-3 (reference), a region unsupported by Amazon Rekognition (reference).

The deployment fails and the GraphQL endpoint is invalid.

Description of changes

Updates scripts/split-e2e-tests.ts to prevent PredictionsTransformerV2Tests from running in ap-northeast-3. This is done by:

  • Forcing PredictionsTransformerV2Tests to run by itself.
  • Adding a TEST_REGION_EXCLUSIONS map that removes excluded regions from the candidate regions.

CDK / CloudFormation Parameters Changed

N/A

Issue #, if available

Related docs PR

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • E2E test run linked
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Any CDK or CloudFormation parameter changes are called out explicitly

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@atierian atierian requested a review from a team as a code owner November 20, 2024 13:59
@atierian atierian merged commit a6e994d into main Nov 20, 2024
8 checks passed
@atierian atierian deleted the ci-predictions-e2e branch November 20, 2024 23:54
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