fix: register persisted enums for native-image reflection (#1695)

Registers persisted enums (and Cognito's VerificationCode) for reflection so
the native image can deserialize persisted state on restart. Covers cognito,
eks, elasticache, eventbridge, memorydb, pipes, and rds.
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-07-02 00:52:21 -05:00
1 parent 1acbb8341f
commit 04fd34fd22
14 files changed
+42

No files matched your search

@@ -2,6 +2,7 @@ package io.github.hectorvent.floci.services.cognito.verification;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.quarkus.runtime.annotations.RegisterForReflection;
import java.time.Instant;
@@ -10,8 +11,10 @@ import java.time.Instant;
* password reset, MFA SMS, attribute verification). The actual code is hashed
* with a per-code salt so dumps and storage snapshots cannot reveal valid codes.
*/
@RegisterForReflection
public final class VerificationCode {
@RegisterForReflection
public enum Purpose {
SIGNUP_CONFIRMATION,
PASSWORD_RESET,
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.eks.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum ClusterStatus {
CREATING, ACTIVE, DELETING, FAILED, UPDATING, DEGRADED
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.elasticache.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum AuthMode {
IAM, PASSWORD, NO_AUTH
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.elasticache.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum CacheClusterStatus {
AVAILABLE, CREATING, DELETING
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.elasticache.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum ReplicationGroupStatus {
CREATING, AVAILABLE, DELETING
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.eventbridge.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum ArchiveState {
ENABLED, DISABLED, CREATING, UPDATING, DELETING
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.eventbridge.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum ReplayState {
STARTING, RUNNING, CANCELLING, COMPLETED, CANCELLED, FAILED
}
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.eventbridge.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum RuleState {
ENABLED,
DISABLED
@@ -1,5 +1,7 @@
package io.github.hectorvent.floci.services.memorydb.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
/**
* Authentication type of a MemoryDB {@link User}. Mirrors the {@code Type} field of the
* real API's {@code AuthenticationMode}/{@code Authentication} structures, whose wire
@@ -8,6 +10,7 @@ package io.github.hectorvent.floci.services.memorydb.model;
* <p>A cluster does not carry an auth mode of its own — it references an ACL, and the
* effective authentication is determined by the auth modes of the users in that ACL.
*/
@RegisterForReflection
public enum AuthMode {
PASSWORD("password"),
IAM("iam"),
@@ -1,9 +1,12 @@
package io.github.hectorvent.floci.services.memorydb.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
/**
* MemoryDB cluster lifecycle states. The wire value is lowercase
* (e.g. {@code available}) to match the real AWS MemoryDB API.
*/
@RegisterForReflection
public enum ClusterStatus {
CREATING("creating"),
AVAILABLE("available"),
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.pipes.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum DesiredState {
RUNNING,
STOPPED
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.pipes.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum PipeState {
RUNNING,
STOPPED,
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.rds.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum DatabaseEngine {
POSTGRES, MYSQL, MARIADB;
@@ -1,5 +1,8 @@
package io.github.hectorvent.floci.services.rds.model;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public enum DbInstanceStatus {
CREATING, AVAILABLE, DELETING, REBOOTING, MODIFYING
}