Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/optimization_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
IMAGE_REPO: ${{ inputs.image-repo }}
CONTAINER: "lmi"
run: |
SERVING_VERSION=${TEST_SERVING_VERSION:-"0.36.0"}
SERVING_VERSION=${TEST_SERVING_VERSION:-"0.37.0"}
SERVING_VERSION=$(echo $SERVING_VERSION | xargs) # trim whitespace

if [ -n "$OVERRIDE_TEST_CONTAINER" ]; then
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
format.version = "1.1"

[versions]
djl = "0.36.0"
serving = "0.36.0"
djl = "0.37.0"
serving = "0.37.0"
onnxruntime = "1.20.0"
commonsCli = "1.9.0"
commonsCodec = "1.18.0"
Expand Down
20 changes: 18 additions & 2 deletions serving/src/test/java/ai/djl/serving/WorkflowTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import org.apache.commons.cli.CommandLine;
import org.testng.Assert;
import org.testng.SkipException;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;

Expand Down Expand Up @@ -70,8 +71,23 @@ public void testCriteria() throws IOException, BadWorkflowException {

@Test
public void testFunctions() throws IOException, BadWorkflowException {
Path workflowFile = Paths.get("src/test/resources/workflows/functions.json");
runWorkflow(workflowFile, zeroInput);
// functions.json declares a custom WorkflowFunction that ships as a bundled .java source
// under workflows/libs/classes, so this test exercises compiling it at load time. That is
// opt-in as of DJL 0.37.0, so enable it here. The environment variable takes precedence
// over the system property, so an environment that pins it off would make the property
// below a no-op and fail the test for an unrelated reason.
String envOptIn = Utils.getenv("DJL_COMPILE_JAVA");
if (envOptIn != null && !Boolean.parseBoolean(envOptIn)) {

@xyang16 xyang16 Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will make this test skipped.

Consider update https://github.com/deepjavalibrary/djl-serving/blob/v0.36.0/.github/workflows/continuous.yml#L48 to:

        run: DJL_COMPILE_JAVA=true ./gradlew --refresh-dependencies build :jacoco:testCodeCoverageReport --stacktrace

@xyang16 xyang16 Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        boolean envOptIn = Boolean.parseBoolean(Utils.getenv("DJL_COMPILE_JAVA", "false"));
        boolean propOptIn = Boolean.parseBoolean(System.getProperty("ai.djl.compile_java", "false"));
        if (!envOptIn && !propOptIn) {
            throw new SkipException("Java compilation is disabled");
        }

throw new SkipException(
"DJL_COMPILE_JAVA is set to " + envOptIn + " in the environment");
}
System.setProperty("ai.djl.compile_java", "true");
try {
Path workflowFile = Paths.get("src/test/resources/workflows/functions.json");
runWorkflow(workflowFile, zeroInput);
} finally {
System.clearProperty("ai.djl.compile_java");
}
}

@Test
Expand Down
Loading