Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): improve Purge task documentation #1237

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions core/src/main/java/io/kestra/core/tasks/storages/Purge.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Purge execution, logs or storage files."
title = "Purge executions, logs, metrics, and storage files.",
description = "This task can be used to purge flow executions data for all flows, for a specific namespace, or for a specific flow."
)
@Plugin(
examples = {
@Example(
title = "Purge all flow execution data for flows ended more than one month ago.",
code = {
"endDate: \"{{ now() | dateAdd(-1, 'MONTHS') }}\"",
"states: ",
Expand All @@ -40,21 +42,21 @@
public class Purge extends Task implements RunnableTask<Purge.Output> {
@Schema(
title = "Namespace to purge or namespace for a flow",
description = "If `flowId` isn't provide, this is a namespace prefix, else the namespace of flow"
description = "If `flowId` isn't provided, this is a namespace prefix, else the namespace of the flow."
)
@PluginProperty(dynamic = true)
private String namespace;

@Schema(
title = "The flow id to purge",
description = "You need to provide the `namespace` properties if you want to purge a flow"
description = "You need to provide the `namespace` properties if you want to purge a flow."
)
@PluginProperty(dynamic = true)
private String flowId;

@Schema(
title = "The max date to purge",
description = "All date after this date will be purged."
description = "All data of flows executed before this date will be purged."
)
@PluginProperty(dynamic = true)
private String endDate;
Expand All @@ -66,28 +68,28 @@ public class Purge extends Task implements RunnableTask<Purge.Output> {
private List<State.Type> states;

@Schema(
title = "Purge execution from repository"
title = "Purge executions from the repository."
)
@PluginProperty
@Builder.Default
private boolean purgeExecution = true;

@Schema(
title = "Purge log from repository"
title = "Purge logs from the repository."
)
@PluginProperty
@Builder.Default
private boolean purgeLog = true;

@Schema(
title = "Purge metric from repository"
title = "Purge metrics from the repository."
)
@PluginProperty
@Builder.Default
private boolean purgeMetric = true;

@Schema(
title = "Purge file from internal storage"
title = "Purge files from the internal storage."
)
@PluginProperty
@Builder.Default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
@NoArgsConstructor
@Schema(
title = "Purge all files from the internal storage created by this execution.",
description = "Will delete all the generated files from a flow for this current execution. This will delete:\n+" +
description = "Will delete all the generated files from a flow for this current execution. This will delete all files from:\n+" +
"- inputs\n" +
"- outputs\n" +
"- triggers\n\n + " +
"If the current execution don't have any generated files, the task will not failed.\n" +
"If you pass an internal storage URI from another execution, it **will not** be deleted, only files from the current execution are deleted."
"If the current execution don't have any generated files, the task will not failed."
)
@Plugin(
examples = {
Expand Down