Light, fluffy, and always free - The AWS Local Emulator alternative
chore(compat): run the partition nightly in GovCloud and EUSC too (#5616)
Hector Venturad3999ad41663
diff --git a/.github/ci/compat-partition-allowlist-eusc-de-east-1.txt b/.github/ci/compat-partition-allowlist-eusc-de-east-1.txtnew file mode 100644index 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.txtnew file mode 100644index 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.ymlindex 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-<region>.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 testdefault: floci/floci:nightlyregion:- 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-armtimeout-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 exactdiff --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.javaindex 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);}@Testdiff --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.javaindex 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)