From cce4b5f6c082a7fe33ebc2e90d3b32f806c1656f Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Sat, 10 Oct 2026 23:11:46 -0500 Subject: [PATCH] chore(core): fail fast when an ARN is minted with a blank region (#5430) * chore(core): fail fast when an ARN is minted with a blank region Arn.of derives the partition from the region, so a blank region that arrives through a variable silently mints arn:aws:, which the partition-check gate cannot see. The test build now sets a JVM system property that makes such a mint throw, naming the call site; outside it the ARN is minted as before and the call site is logged once, so production responses do not change. Signed-off-by: Hector Ventura * test: give two fixtures the region the blank-region guard requires GlobalAcceleratorServiceTest mocked RegionResolver.buildArn with Arn.of, which the real resolver never calls for the blank region Global Accelerator passes: it mints a global ARN. The mock now delegates to a real resolver. EventSourceMappingSerializationTest built mappings with no region, which LambdaService always sets on create; the fixtures set one. Signed-off-by: Hector Ventura --------- Signed-off-by: Hector Ventura --- pom.xml | 2 + .../floci/core/common/AwsArnUtils.java | 4 +- .../floci/core/common/BlankRegionGuard.java | 58 +++++++++++++++++++ .../floci/core/common/AwsArnUtilsTest.java | 40 +++++++++++-- .../GlobalAcceleratorServiceTest.java | 6 +- .../EventSourceMappingSerializationTest.java | 3 + 6 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 src/main/java/io/github/hectorvent/floci/core/common/BlankRegionGuard.java diff --git a/pom.xml b/pom.xml index 1eb1d9472b..9ec18ccfbf 100644 --- a/pom.xml +++ b/pom.xml @@ -470,6 +470,8 @@ @{argLine} -Xmx6g org.jboss.logmanager.LogManager + + true