From 0f126e3de6f7ccefe6bf92535c59e8b5cd936d55 Mon Sep 17 00:00:00 2001 From: sharmabikram Date: Wed, 15 Apr 2026 13:59:58 -0700 Subject: [PATCH] chore(java): Attempt to reduce flaky CI (#2220) --- .github/workflows/ci_test_vector_java.yml | 8 +++ ...EncryptionInterceptorIntegrationTests.java | 2 +- cfn/CI.yaml | 49 ++----------------- 3 files changed, 13 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci_test_vector_java.yml b/.github/workflows/ci_test_vector_java.yml index 5fcf6e15b1..1557961cd6 100644 --- a/.github/workflows/ci_test_vector_java.yml +++ b/.github/workflows/ci_test_vector_java.yml @@ -51,6 +51,14 @@ jobs: if: matrix.os == 'macos-15-intel' && matrix.library == 'TestVectors' uses: douglascamata/setup-docker-macos-action@v1.1.0 + - name: Pre-pull DynamoDB Local image with retry + if: matrix.library == 'TestVectors' + uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + command: docker pull amazon/dynamodb-local:latest + - name: Setup DynamoDB Local if: matrix.library == 'TestVectors' uses: rrainn/dynamodb-action@v4.0.0 diff --git a/DynamoDbEncryption/runtimes/java/src/test/java/software/amazon/cryptography/dbencryptionsdk/dynamodb/DynamoDbEncryptionInterceptorIntegrationTests.java b/DynamoDbEncryption/runtimes/java/src/test/java/software/amazon/cryptography/dbencryptionsdk/dynamodb/DynamoDbEncryptionInterceptorIntegrationTests.java index e002b24525..69907c4ebd 100644 --- a/DynamoDbEncryption/runtimes/java/src/test/java/software/amazon/cryptography/dbencryptionsdk/dynamodb/DynamoDbEncryptionInterceptorIntegrationTests.java +++ b/DynamoDbEncryption/runtimes/java/src/test/java/software/amazon/cryptography/dbencryptionsdk/dynamodb/DynamoDbEncryptionInterceptorIntegrationTests.java @@ -394,7 +394,7 @@ public void TestTransactWriteAndGet() { // Put Item into table via transactions HashMap item = new HashMap<>(); - String partitionValue = "transact"; + String partitionValue = "transact" + randomNum; String sortValue1 = "1"; String sortValue2 = "2"; String attrValue = "lorem ipsum"; diff --git a/cfn/CI.yaml b/cfn/CI.yaml index a79839149a..1c8927bba8 100644 --- a/cfn/CI.yaml +++ b/cfn/CI.yaml @@ -60,6 +60,7 @@ Resources: - AttributeName: "sort_key" KeyType: "RANGE" TableName: !Ref TableName + BillingMode: PAY_PER_REQUEST # These tables were manually created but not used in CI # If we have to start using them in CI we just have to add @@ -102,9 +103,6 @@ Resources: KeyType: "HASH" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "state-zip-index" KeySchema: - AttributeName: "aws_dbe_b_state" @@ -113,36 +111,24 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "location-index" KeySchema: - AttributeName: "aws_dbe_b_location" KeyType: "HASH" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "stateAndHasSensitiveData-index" KeySchema: - AttributeName: "aws_dbe_b_stateAndHasSensitiveData" KeyType: "HASH" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "buildingAndFloor-index" KeySchema: - AttributeName: "aws_dbe_b_buildingAndFloor" KeyType: "HASH" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "email-birthday-index" KeySchema: - AttributeName: "aws_dbe_b_email" @@ -151,9 +137,6 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "address-birthday-index" KeySchema: - AttributeName: "aws_dbe_b_address" @@ -162,17 +145,12 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" KeySchema: - AttributeName: "customer_id" KeyType: "HASH" - AttributeName: "create_time" KeyType: "RANGE" - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" + BillingMode: PAY_PER_REQUEST TableName: !Ref TableWithSimpleBeaconIndexName # This schema is modeled off of @@ -207,9 +185,6 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "GSI-1" KeySchema: - AttributeName: "aws_dbe_b_PK1" @@ -218,18 +193,12 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "GSI-2" KeySchema: - AttributeName: "aws_dbe_b_PK2" KeyType: "HASH" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" - IndexName: "GSI-3" KeySchema: - AttributeName: "aws_dbe_b_PK3" @@ -238,15 +207,10 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" KeySchema: - AttributeName: "partition_key" KeyType: "HASH" - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" + BillingMode: PAY_PER_REQUEST TableName: !Ref TableWithComplexBeaconIndexName TestKeystoreTable: @@ -268,17 +232,12 @@ Resources: KeyType: "RANGE" Projection: ProjectionType: ALL - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" KeySchema: - AttributeName: "branch-key-id" KeyType: "HASH" - AttributeName: "type" KeyType: "RANGE" - ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" + BillingMode: PAY_PER_REQUEST TableName: !Ref KeystoreTableName # This policy SHOULD be given to: