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

kie-kogito-runtimes-3388: Improve serverless workflows timeouts duration validation message #3433

Merged
merged 2 commits into from
Mar 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
public class TimeoutsConfigResolver {

private static final String NON_NEGATIVE_DURATION_MUST_BE_PROVIDED =
"When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S. Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow";
"When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S." +
" Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow." +
" Note: month based durations like P2M (period of two months) are not valid since the month duration might vary." +
" In that case you can use PT60D instead.";

private static final String INVALID_EVENT_TIMEOUT_FOR_STATE_ERROR = "An invalid \"eventTimeout\": \"%s\" configuration was provided for the state \"%s\" in the serverless workflow: \"%s\"." +
NON_NEGATIVE_DURATION_MUST_BE_PROVIDED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class KogitoAssetsProcessor {
@BuildStep
public KogitoBuildContextBuildItem generateKogitoBuildContext(List<KogitoBuildContextAttributeBuildItem> attributes) {
// configure the application generator
PathCollection rootPaths = getRootPaths( root.getResolvedPaths());
PathCollection rootPaths = getRootPaths(root.getResolvedPaths());
KogitoBuildContext context =
kogitoBuildContext(outputTargetBuildItem.getOutputDirectory(),
rootPaths,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import java.nio.file.Path;
import java.util.Arrays;

import org.junit.jupiter.api.Test;

import io.quarkus.bootstrap.model.PathsCollection;
import io.quarkus.paths.PathCollection;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -43,4 +44,4 @@ void getRootPathsWithClasses() {
String expectedPath = String.format("%s/%s/generated-resources", projectDirPath, outputTargetPath).replace("/", File.separator);
assertTrue(retrieved.contains(Path.of(expectedPath)));
}
}
}
Loading