Skip to content
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
7 changes: 7 additions & 0 deletions .github/actions/thread-dump-post/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Thread dump on cancellation
description: Capture JVM thread dumps after a job is cancelled.
runs:
using: node20
main: main.js
post: post.js
post-if: cancelled()
1 change: 1 addition & 0 deletions .github/actions/thread-dump-post/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Thread dump post-step registered.");
40 changes: 40 additions & 0 deletions .github/actions/thread-dump-post/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { execSync } = require("child_process");

function run(command) {
execSync(command, { stdio: "inherit", shell: "/bin/bash" });
}

function dumpThreads() {
run('echo "== Cancellation detected: capturing JVM thread dumps =="');
run(
[
"set -euo pipefail",
"pids=$(pgrep -f '[j]ava' || true)",
'if [[ -z "${pids}" ]]; then echo "No Java processes found."; exit 0; fi',
"if command -v jcmd >/dev/null 2>&1; then",
" for pid in ${pids}; do",
' echo "-- jcmd Thread.print for PID ${pid} --"',
" jcmd \"${pid}\" Thread.print || true",
" done",
" exit 0",
"fi",
"if command -v jstack >/dev/null 2>&1; then",
" for pid in ${pids}; do",
' echo "-- jstack for PID ${pid} --"',
" jstack \"${pid}\" || true",
" done",
" exit 0",
"fi",
"for pid in ${pids}; do",
' echo "-- kill -QUIT ${pid} (no jcmd/jstack available) --"',
" kill -QUIT \"${pid}\" || true",
"done",
].join("\n")
);
}

try {
dumpThreads();
} catch (error) {
console.error("Thread dump post-step failed:", error);
}
4 changes: 3 additions & 1 deletion .github/workflows/develop-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand All @@ -29,7 +31,7 @@ jobs:
- name: Build
run: mvn -B -U clean install -Pquick,\!formatting
- name: Verify
run: ./scripts/ci/run-with-thread-dump.sh mvn -B install -P-skipSlowTests -Dmaven.javadoc.skip=true
run: exec ./scripts/ci/run-with-thread-dump.sh mvn -B install -P-skipSlowTests -Dmaven.javadoc.skip=true
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/main-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand All @@ -29,7 +31,7 @@ jobs:
- name: Build
run: mvn -B -U -T 2C clean install -DskipTests
- name: Run all tests
run: ./scripts/ci/run-with-thread-dump.sh mvn -B install -P-skipSlowTests -Dmaven.javadoc.skip=true
run: exec ./scripts/ci/run-with-thread-dump.sh mvn -B install -P-skipSlowTests -Dmaven.javadoc.skip=true
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: maven
- name: Check formatting
run: mvn -B --quiet -T 2C formatter:validate impsort:check xml-format:xml-check
run: mvn -B -Pformatting spotless:check
- name: Quick compile
run: mvn -B --quiet -T 2C compile -DskipTests -Pquick
- name: Download all other dependencies
Expand All @@ -34,6 +36,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -53,6 +57,8 @@ jobs:
jdk: [ 11, 25 ]
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -62,7 +68,7 @@ jobs:
- name: Build
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
- name: Test
run: ./scripts/ci/run-with-thread-dump.sh mvn -B test -DskipITs -P-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
run: exec ./scripts/ci/run-with-thread-dump.sh mvn -B test -DskipITs -P-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1.9.0
Expand All @@ -75,6 +81,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -84,7 +92,7 @@ jobs:
- name: Build
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
- name: Verify
run: ./scripts/ci/run-with-thread-dump.sh mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip -Denforcer.skip -Danimal.sniffer.skip
run: exec ./scripts/ci/run-with-thread-dump.sh mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip -Denforcer.skip -Danimal.sniffer.skip
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1.9.0
Expand All @@ -96,6 +104,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -105,7 +115,7 @@ jobs:
- name: Build
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
- name: Verify
run: ./scripts/ci/run-with-thread-dump.sh mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
run: exec ./scripts/ci/run-with-thread-dump.sh mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1.9.0
Expand All @@ -117,6 +127,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -134,6 +146,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -148,11 +162,13 @@ jobs:
node-version: 18
- name: Run end-to-end tests of RDF4J Server and Workbench
working-directory: ./e2e
run: ../scripts/ci/run-with-thread-dump.sh ./run.sh
run: exec ../scripts/ci/run-with-thread-dump.sh ./run.sh

copyright-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register JVM thread dump on cancel
uses: ./.github/actions/thread-dump-post
- name: check copyright header present
run: scripts/checkCopyrightPresent.sh
2 changes: 1 addition & 1 deletion assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>edl-v1.0.txt</resource>
<file>../edl-v1.0.txt</file>
Expand Down
8 changes: 4 additions & 4 deletions assembly/src/main/assembly/sdk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<fileSets>
<fileSet>
<directory>..</directory>
<outputDirectory/>
<outputDirectory />
<includes>
<include>*.txt</include>
</includes>
Expand Down Expand Up @@ -49,15 +49,15 @@
</file>
<file>
<source>../edl-v1.0.txt</source>
<outputDirectory/>
<outputDirectory />
</file>
<file>
<source>../about.md</source>
<outputDirectory/>
<outputDirectory />
</file>
<file>
<source>../notice.md</source>
<outputDirectory/>
<outputDirectory />
</file>
</files>
</assembly>
10 changes: 5 additions & 5 deletions compliance/elasticsearch/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
</encoder>
</appender>
<logger name="org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchSailTest">
<level value="warn"/>
<level value="warn" />
</logger>
<logger name="org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailSpinTest">
<level value="info"/>
<level value="info" />
</logger>
<logger name="org.eclipse.rdf4j.sail.lucene.AbstractLuceneSailTupleFunctionTest">
<level value="warn"/>
<level value="warn" />
</logger>
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
6 changes: 3 additions & 3 deletions compliance/repository/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %msg%n</pattern>
</encoder>
</appender>
<logger name="org.eclipse.rdf4j" level="info"/>
<logger name="org.eclipse.rdf4j" level="info" />
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
4 changes: 2 additions & 2 deletions compliance/rio/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</encoder>
</appender>
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
6 changes: 3 additions & 3 deletions compliance/solr/solr/cores/embedded/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<config>
<luceneMatchVersion>8.9.0</luceneMatchVersion>
<dataDir>target/test-data</dataDir>
<requestHandler name="/select" class="solr.SearchHandler"/>
<requestHandler name="/get" class="solr.RealTimeGetHandler"/>
<directoryFactory class="org.apache.solr.core.RAMDirectoryFactory"/>
<requestHandler name="/select" class="solr.SearchHandler" />
<requestHandler name="/get" class="solr.RealTimeGetHandler" />
<directoryFactory class="org.apache.solr.core.RAMDirectoryFactory" />
<indexConfig>
<lockType>single</lockType>
</indexConfig>
Expand Down
2 changes: 1 addition & 1 deletion compliance/solr/solr/solr.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<solr/>
<solr />
6 changes: 3 additions & 3 deletions compliance/solr/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %msg%n</pattern>
</encoder>
</appender>
<logger name="org.eclipse.rdf4j" level="debug"/>
<logger name="org.eclipse.rdf4j" level="debug" />
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
4 changes: 2 additions & 2 deletions compliance/sparql/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</encoder>
</appender>
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
10 changes: 5 additions & 5 deletions core/http/client/src/test/resources/__files/repository-list.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="uri"/>
<variable name="id"/>
<variable name="title"/>
<variable name="readable"/>
<variable name="writable"/>
<variable name="uri" />
<variable name="id" />
<variable name="title" />
<variable name="readable" />
<variable name="writable" />
</head>
<results ordered="false" distinct="false">
<result>
Expand Down
4 changes: 2 additions & 2 deletions core/http/client/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</encoder>
</appender>
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
4 changes: 2 additions & 2 deletions core/http/protocol/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</encoder>
</appender>
<root>
<level value="warn"/>
<appender-ref ref="STDOUT"/>
<level value="warn" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static java.time.temporal.ChronoUnit.YEARS;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatNullPointerException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
package org.eclipse.rdf4j.query.algebra.evaluation.function.xsd;

import static javax.xml.datatype.DatatypeConstants.FIELD_UNDEFINED;

import static org.eclipse.rdf4j.model.datatypes.XMLDatatypeUtil.isValidDate;

import javax.xml.datatype.XMLGregorianCalendar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public Value evaluate(BindingSet bindings) throws ValueExprEvaluationException,
return alternative.evaluate(bindings);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public Value evaluate(BindingSet bindings) throws ValueExprEvaluationException,
}
return valueFactory.createTriple((Resource) subj, (IRI) pred, obj);
}
}
}
Loading
Loading