From d3999ad4166378ce86f257b95f8d07f399f11b45 Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Tue, 13 Oct 2026 22:58:24 -0500 Subject: [PATCH] chore(compat): run the partition nightly in GovCloud and EUSC too (#5616) The partition compatibility nightly ran the Java SDK suite in cn-north-1 only. GovCloud (IAM signs us-gov-west-1, no CloudFront) and EUSC (no global endpoints) take their own code paths and had no end-to-end check. The job is now a matrix of cn-north-1, us-gov-west-1 and eusc-de-east-1; a dispatch that names a region runs that region alone. Measured locally on main 367ae0b2d with a JVM image: a us-east-1 control run and one run per new region, 2461 tests each. Beyond the control run's one failure, GovCloud showed one and EUSC four, all in tests that assumed the commercial partition, so they are fixed here and both new allowlists start empty: - WafV2Test.cloudfrontScopeIsolated created a CLOUDFRONT-scope IP set, which Floci refuses where CloudFront does not exist. It now runs only in the partitions that have CloudFront. - S3Test built its LocationConstraint through the SDK enum, which has no value for eusc-de-east-1 and is then sent as the literal "null". It passes the region id as a string. The workflow checks the suite out at the commit the nightly image was built from, so the new legs first run with these fixes on the nightly after this lands. Signed-off-by: Hector Ventura --- ...pat-partition-allowlist-eusc-de-east-1.txt | 6 ++++++ ...mpat-partition-allowlist-us-gov-west-1.txt | 6 ++++++ .github/workflows/compat-partitions.yml | 21 ++++++++++++------- .../src/test/java/com/floci/test/S3Test.java | 10 +++++---- .../test/java/com/floci/test/WafV2Test.java | 2 ++ 5 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 .github/ci/compat-partition-allowlist-eusc-de-east-1.txt create mode 100644 .github/ci/compat-partition-allowlist-us-gov-west-1.txt diff --git a/.github/ci/compat-partition-allowlist-eusc-de-east-1.txt b/.github/ci/compat-partition-allowlist-eusc-de-east-1.txt new file mode 100644 index 0000000000..9027162655 --- /dev/null +++ b/.github/ci/compat-partition-allowlist-eusc-de-east-1.txt @@ -0,0 +1,6 @@ +# Known failures of the Java SDK suite against a Floci deployed in eusc-de-east-1, with the +# fixture clients signing for eusc-de-east-1 (.github/workflows/compat-partitions.yml). +# Checked by .github/ci/compat-allowlist-check.py: one `Class#method` per line; a failure +# missing from this list, or an entry that no longer fails, fails the run. Delete an entry +# as soon as its test passes. Measured 2026-10-13 on main 367ae0b2d, JVM image; failures +# that also occur in the commercial control run are environmental and not listed. diff --git a/.github/ci/compat-partition-allowlist-us-gov-west-1.txt b/.github/ci/compat-partition-allowlist-us-gov-west-1.txt new file mode 100644 index 0000000000..c52ad91307 --- /dev/null +++ b/.github/ci/compat-partition-allowlist-us-gov-west-1.txt @@ -0,0 +1,6 @@ +# Known failures of the Java SDK suite against a Floci deployed in us-gov-west-1, with the +# fixture clients signing for us-gov-west-1 (.github/workflows/compat-partitions.yml). +# Checked by .github/ci/compat-allowlist-check.py: one `Class#method` per line; a failure +# missing from this list, or an entry that no longer fails, fails the run. Delete an entry +# as soon as its test passes. Measured 2026-10-13 on main 367ae0b2d, JVM image; failures +# that also occur in the commercial control run are environmental and not listed. diff --git a/.github/workflows/compat-partitions.yml b/.github/workflows/compat-partitions.yml index 00789d5df5..9e472b838d 100644 --- a/.github/workflows/compat-partitions.yml +++ b/.github/workflows/compat-partitions.yml @@ -2,11 +2,11 @@ name: Partition Compatibility # The Java SDK suite against a Floci deployed in a non-commercial partition, so # the SDK's own partition logic (arn:aws-cn: ARNs, China signing scopes, the -# LocationConstraint S3 CreateBucket sends) has to round-trip end to end. Part -# of #4272. +# LocationConstraint S3 CreateBucket sends) has to round-trip end to end. One leg +# per partition family: China, GovCloud and EUSC. Part of #4272. # # Runs after each Nightly against the image it just published, not per PR: it -# is one more ~15 minute native suite, and the per-PR legs already queue for +# is three more ~15 minute native suites, and the per-PR legs already queue for # the shared runner pools (see compatibility.yml). Known failures live in # .github/ci/compat-partition-allowlist-.txt (a region without one has # none); a failure missing from it, or an entry that no longer fails, fails the @@ -22,8 +22,8 @@ on: description: Floci image to test default: floci/floci:nightly region: - description: Region Floci and the SDK clients default to - default: cn-north-1 + description: Run this one region only (any region Floci serves); blank runs every nightly leg + default: '' permissions: contents: read @@ -34,15 +34,22 @@ concurrency: jobs: sdk-test-java: - name: sdk-test-java / ${{ inputs.region || 'cn-north-1' }} + name: sdk-test-java / ${{ matrix.region }} if: >- !github.event.repository.fork && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') runs-on: ubuntu-24.04-arm timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + # One region per partition family that takes its own code path: China (IAM signs + # cn-north-1), GovCloud (IAM signs us-gov-west-1, no CloudFront) and EUSC (no global + # endpoints at all). A dispatch that names a region runs that region alone. + region: ${{ fromJSON(inputs.region && format('["{0}"]', inputs.region) || '["cn-north-1", "us-gov-west-1", "eusc-de-east-1"]') }} env: IMAGE: ${{ inputs.image || 'floci/floci:nightly' }} - REGION: ${{ inputs.region || 'cn-north-1' }} + REGION: ${{ matrix.region }} steps: # The tag is mutable, so the suite and allowlist are checked out at the commit this exact diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3Test.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3Test.java index 3247436b79..32ed165a4a 100644 --- a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3Test.java +++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3Test.java @@ -62,9 +62,11 @@ class S3Test { private static final String BUCKET = "sdk-test-bucket"; private static final String LOCATED_BUCKET = "sdk-test-bucket-located"; // Only the us-east-1 endpoint creates a bucket in another region; any other endpoint takes its own. - private static final BucketLocationConstraint LOCATION = TestFixtures.region().id().equals("us-east-1") - ? BucketLocationConstraint.EU_CENTRAL_1 - : BucketLocationConstraint.fromValue(TestFixtures.region().id()); + // A string, not the SDK enum: the enum has no value for the ISO and EUSC regions, and an unknown + // one would be sent as the literal "null". + private static final String LOCATION = TestFixtures.region().id().equals("us-east-1") + ? "eu-central-1" + : TestFixtures.region().id(); private static final String KEY = "test-file.txt"; private static final String CONTENT = "Hello from AWS SDK v2!"; @@ -112,7 +114,7 @@ class S3Test { GetBucketLocationResponse response = s3.getBucketLocation( GetBucketLocationRequest.builder().bucket(LOCATED_BUCKET).build()); - assertThat(response.locationConstraint()).isEqualTo(LOCATION); + assertThat(response.locationConstraintAsString()).isEqualTo(LOCATION); } @Test diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/WafV2Test.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/WafV2Test.java index f0223b1d1c..2ecfca78a0 100644 --- a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/WafV2Test.java +++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/WafV2Test.java @@ -159,6 +159,8 @@ class WafV2Test { @Test @Order(9) void cloudfrontScopeIsolated() { + Assumptions.assumeTrue(List.of("aws", "aws-cn").contains(TestFixtures.partition()), + "the CLOUDFRONT scope exists only in the partitions that have CloudFront"); waf.createIPSet(r -> r .name(ipSetName).scope(Scope.CLOUDFRONT) .ipAddressVersion(IPAddressVersion.IPV4)