diff --git a/cli/src/main/resources/application.yml b/cli/src/main/resources/application.yml index 0477fc2593..62674f54b4 100644 --- a/cli/src/main/resources/application.yml +++ b/cli/src/main/resources/application.yml @@ -137,6 +137,11 @@ flyway: # We must ignore missing migrations as we delete some wrong or not used anymore migrations ignore-migration-patterns: "*:missing,*:future" out-of-order: true + properties: + flyway: + postgresql: + transactional: + lock: false mysql: enabled: true locations: diff --git a/core/src/main/java/io/kestra/core/models/SoftDeletion.java b/core/src/main/java/io/kestra/core/models/SoftDeletable.java similarity index 93% rename from core/src/main/java/io/kestra/core/models/SoftDeletion.java rename to core/src/main/java/io/kestra/core/models/SoftDeletable.java index 1dcd799b1c..f7414db9c6 100644 --- a/core/src/main/java/io/kestra/core/models/SoftDeletion.java +++ b/core/src/main/java/io/kestra/core/models/SoftDeletable.java @@ -5,7 +5,7 @@ package io.kestra.core.models; * Soft deletion is based on a deleted field that is set to true when the entity is deleted. * Physical deletion either never occurs or occurs in a dedicated purge mechanism. */ -public interface SoftDeletion { +public interface SoftDeletable { /** * Whether en entity is deleted or not. */ diff --git a/core/src/main/java/io/kestra/core/models/dashboards/Dashboard.java b/core/src/main/java/io/kestra/core/models/dashboards/Dashboard.java index 670dfec91c..800c3b3665 100644 --- a/core/src/main/java/io/kestra/core/models/dashboards/Dashboard.java +++ b/core/src/main/java/io/kestra/core/models/dashboards/Dashboard.java @@ -1,7 +1,7 @@ package io.kestra.core.models.dashboards; import com.fasterxml.jackson.annotation.JsonIgnore; -import io.kestra.core.models.SoftDeletion; +import io.kestra.core.models.SoftDeletable; import io.kestra.core.models.HasUID; import io.kestra.core.models.dashboards.charts.Chart; import io.kestra.core.utils.IdUtils; @@ -26,7 +26,7 @@ import java.util.Objects; @NoArgsConstructor @Introspected @ToString -public class Dashboard implements HasUID, SoftDeletion { +public class Dashboard implements HasUID, SoftDeletable { @Hidden @Pattern(regexp = "^[a-z0-9][a-z0-9_-]*") private String tenantId; diff --git a/core/src/main/java/io/kestra/core/models/executions/Execution.java b/core/src/main/java/io/kestra/core/models/executions/Execution.java index 9dda511ffe..2ae8c33189 100644 --- a/core/src/main/java/io/kestra/core/models/executions/Execution.java +++ b/core/src/main/java/io/kestra/core/models/executions/Execution.java @@ -11,7 +11,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Streams; import io.kestra.core.debug.Breakpoint; import io.kestra.core.exceptions.InternalException; -import io.kestra.core.models.SoftDeletion; +import io.kestra.core.models.SoftDeletable; import io.kestra.core.models.Label; import io.kestra.core.models.TenantInterface; import io.kestra.core.models.flows.Flow; @@ -53,7 +53,7 @@ import java.util.zip.CRC32; @AllArgsConstructor @ToString @EqualsAndHashCode -public class Execution implements SoftDeletion, TenantInterface { +public class Execution implements SoftDeletable, TenantInterface { @With @Hidden diff --git a/core/src/main/java/io/kestra/core/models/executions/LogEntry.java b/core/src/main/java/io/kestra/core/models/executions/LogEntry.java index fef1a70b64..fd01c2de4b 100644 --- a/core/src/main/java/io/kestra/core/models/executions/LogEntry.java +++ b/core/src/main/java/io/kestra/core/models/executions/LogEntry.java @@ -1,7 +1,6 @@ package io.kestra.core.models.executions; import com.fasterxml.jackson.annotation.JsonInclude; -import io.kestra.core.models.DeletedInterface; import io.kestra.core.models.TenantInterface; import io.kestra.core.models.flows.FlowInterface; import io.kestra.core.models.triggers.AbstractTrigger; @@ -22,7 +21,7 @@ import java.util.stream.Stream; @Value @Builder(toBuilder = true) -public class LogEntry implements DeletedInterface, TenantInterface { +public class LogEntry implements TenantInterface { @Hidden @Pattern(regexp = "^[a-z0-9][a-z0-9_-]*") String tenantId; @@ -57,10 +56,6 @@ public class LogEntry implements DeletedInterface, TenantInterface { String message; - @NotNull - @Builder.Default - boolean deleted = false; - @Nullable ExecutionKind executionKind; diff --git a/core/src/main/java/io/kestra/core/models/executions/MetricEntry.java b/core/src/main/java/io/kestra/core/models/executions/MetricEntry.java index 96fd0913fe..364c2c6f05 100644 --- a/core/src/main/java/io/kestra/core/models/executions/MetricEntry.java +++ b/core/src/main/java/io/kestra/core/models/executions/MetricEntry.java @@ -1,7 +1,6 @@ package io.kestra.core.models.executions; import com.fasterxml.jackson.annotation.JsonInclude; -import io.kestra.core.models.DeletedInterface; import io.kestra.core.models.TenantInterface; import io.kestra.core.models.executions.metrics.Counter; import io.kestra.core.models.executions.metrics.Gauge; @@ -18,7 +17,7 @@ import jakarta.validation.constraints.Pattern; @Value @Builder(toBuilder = true) -public class MetricEntry implements DeletedInterface, TenantInterface { +public class MetricEntry implements TenantInterface { @Hidden @Pattern(regexp = "^[a-z0-9][a-z0-9_-]*") String tenantId; @@ -54,10 +53,6 @@ public class MetricEntry implements DeletedInterface, TenantInterface { @Nullable Map tags; - @NotNull - @Builder.Default - boolean deleted = false; - @Nullable ExecutionKind executionKind; diff --git a/core/src/main/java/io/kestra/core/models/flows/FlowInterface.java b/core/src/main/java/io/kestra/core/models/flows/FlowInterface.java index f98cda829e..76358b7afe 100644 --- a/core/src/main/java/io/kestra/core/models/flows/FlowInterface.java +++ b/core/src/main/java/io/kestra/core/models/flows/FlowInterface.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.kestra.core.models.SoftDeletion; +import io.kestra.core.models.SoftDeletable; import io.kestra.core.models.HasSource; import io.kestra.core.models.HasUID; import io.kestra.core.models.Label; @@ -27,7 +27,7 @@ import java.util.stream.Collectors; * The base interface for FLow. */ @JsonDeserialize(as = GenericFlow.class) -public interface FlowInterface extends FlowId, SoftDeletion, TenantInterface, HasUID, HasSource { +public interface FlowInterface extends FlowId, SoftDeletable, TenantInterface, HasUID, HasSource { Pattern YAML_REVISION_MATCHER = Pattern.compile("(?m)^revision: \\d+\n?"); diff --git a/core/src/main/java/io/kestra/core/models/kv/PersistedKvMetadata.java b/core/src/main/java/io/kestra/core/models/kv/PersistedKvMetadata.java index 2998b4d776..a3025d04e8 100644 --- a/core/src/main/java/io/kestra/core/models/kv/PersistedKvMetadata.java +++ b/core/src/main/java/io/kestra/core/models/kv/PersistedKvMetadata.java @@ -1,6 +1,6 @@ package io.kestra.core.models.kv; -import io.kestra.core.models.SoftDeletion; +import io.kestra.core.models.SoftDeletable; import io.kestra.core.models.HasUID; import io.kestra.core.models.TenantInterface; import io.kestra.core.storages.kv.KVEntry; @@ -22,7 +22,7 @@ import java.util.Optional; @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) @ToString @EqualsAndHashCode -public class PersistedKvMetadata implements SoftDeletion, TenantInterface, HasUID { +public class PersistedKvMetadata implements SoftDeletable, TenantInterface, HasUID { @With @Hidden @Pattern(regexp = "^[a-z0-9][a-z0-9_-]*") diff --git a/core/src/main/java/io/kestra/core/models/templates/Template.java b/core/src/main/java/io/kestra/core/models/templates/Template.java index 758daed8b5..fd73bb3ae6 100644 --- a/core/src/main/java/io/kestra/core/models/templates/Template.java +++ b/core/src/main/java/io/kestra/core/models/templates/Template.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotatedMember; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; -import io.kestra.core.models.SoftDeletion; import io.kestra.core.models.HasUID; +import io.kestra.core.models.SoftDeletable; import io.kestra.core.models.TenantInterface; import io.kestra.core.models.tasks.Task; import io.kestra.core.models.validations.ManualConstraintViolation; @@ -35,7 +35,7 @@ import jakarta.validation.constraints.Pattern; @Introspected @ToString @EqualsAndHashCode -public class Template implements SoftDeletion