Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Fixing bug related to s3 archival of only failed workflows #7

Open
wants to merge 1 commit into
base: PX-64-log4j-upgrade
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public interface Configuration {
int S3_ARCHIVAL_BUCKET_PREFIX_NUM_CHARACTERS_DEFAULT_VALUE = 8;

String ARCHIVE_UNSUCCESSFUL_ONLY_PROPERTY_NAME = "workflow.archive.unsuccessful.only";
boolean ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE = false;
boolean ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE = true;

enum ArchivalType {
ELASTICSEARCH, S3
Expand Down Expand Up @@ -184,7 +184,7 @@ default ArchivalType getWorkflowArchivalType() {
/**
* @return if true(not default), archives only unsuccessful workflows
*/
default boolean shouldArhivelOnlyUnsuccessfulWorkflows() {
default boolean shouldArchivalOnlyUnsuccessfulWorkflows() {
return getBooleanProperty(ARCHIVE_UNSUCCESSFUL_ONLY_PROPERTY_NAME, ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private void removeWorkflowIndex(Workflow workflow , boolean archiveWorkflow) th
// Only allow archival if workflow is in terminal state
// DO NOT archive async, since if archival errors out, workflow data will be lost
// Only archive unsuccessful workflows if enabled
if (!config.shouldArhivelOnlyUnsuccessfulWorkflows() || !workflow.getStatus().isSuccessful()) {
if (!config.shouldArchivalOnlyUnsuccessfulWorkflows() || !workflow.getStatus().isSuccessful()) {
workflowArchiver.archiveWorkflow(workflow);
}
} else {
Expand Down