Light, fluffy, and always free - The AWS Local Emulator alternative
fix(ecs): register persisted model records for native-image reflection (#1606)
Hector Ventura47e79b0ff5fe
diff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/EfsVolumeConfiguration.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/EfsVolumeConfiguration.javaindex aca8cdf45e..e4788306ea 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/EfsVolumeConfiguration.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/EfsVolumeConfiguration.java@@ -1,5 +1,7 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;+/*** The {@code efsVolumeConfiguration} of an ECS task-definition volume:* {@code {"fileSystemId": ..., "rootDirectory": ..., "transitEncryption": ...,@@ -15,6 +17,7 @@ package io.github.hectorvent.floci.services.ecs.model;* {@code authorizationConfig} are modelled for RegisterTaskDefinition/DescribeTaskDefinition* round-trip fidelity (so Terraform sees no drift) but have no effect on the local mount.*/+@RegisterForReflectionpublic record EfsVolumeConfiguration(String fileSystemId,String rootDirectory,diff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/KeyValuePair.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/KeyValuePair.javaindex 44425c99a7..4052fea987 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/KeyValuePair.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/KeyValuePair.java@@ -1,4 +1,7 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic record KeyValuePair(String name, String value) {}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/MountPoint.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/MountPoint.javaindex c9f1a804f3..ba442c664b 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/MountPoint.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/MountPoint.java@@ -1,10 +1,13 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;+/*** A container mount point in an ECS container definition:* {@code {"sourceVolume": ..., "containerPath": ..., "readOnly": ...}}.* {@code sourceVolume} references a task-level {@link Volume} by name; the volume's* host source path is bind-mounted into the container at {@code containerPath}.*/+@RegisterForReflectionpublic record MountPoint(String sourceVolume, String containerPath, boolean readOnly) {}diff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/NetworkBinding.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/NetworkBinding.javaindex ff11244df1..9ea45d3153 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/NetworkBinding.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/NetworkBinding.java@@ -1,4 +1,7 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic record NetworkBinding(String bindIP, int containerPort, int hostPort, String protocol) {}diff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/PortMapping.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/PortMapping.javaindex 0a609e519c..7b3eb2863c 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/PortMapping.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/PortMapping.java@@ -1,5 +1,8 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflectionpublic record PortMapping(int containerPort, int hostPort, String protocol) {public PortMapping(int containerPort) {diff --git a/src/main/java/io/github/hectorvent/floci/services/ecs/model/Volume.java b/src/main/java/io/github/hectorvent/floci/services/ecs/model/Volume.javaindex 37085df92b..9b56a49bef 100644--- a/src/main/java/io/github/hectorvent/floci/services/ecs/model/Volume.java+++ b/src/main/java/io/github/hectorvent/floci/services/ecs/model/Volume.java@@ -1,5 +1,7 @@package io.github.hectorvent.floci.services.ecs.model;+import io.quarkus.runtime.annotations.RegisterForReflection;+/*** A task-level volume in an ECS task definition. Two shapes are modelled:* <ul>@@ -11,6 +13,7 @@ package io.github.hectorvent.floci.services.ecs.model;* The two are mutually exclusive. A container references the volume by {@code name} via a* {@link MountPoint}.*/+@RegisterForReflectionpublic record Volume(String name, String hostSourcePath, EfsVolumeConfiguration efs) {/** Convenience constructor for a {@code host} volume (no EFS configuration). */