Skip to content

Commit b93bdad

Browse files
committed
Java: Fix
1 parent e947489 commit b93bdad

2 files changed

Lines changed: 34 additions & 6 deletions

File tree

java/ql/integration-tests/java/buildless-maven-timeout/diagnostics.expected

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
{
2+
"markdownMessage": "A Maven process was aborted because it didn't write to the console for 3 seconds. Consider either lenghtening the timeout if appropriate by setting CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT to a higher value or zero for no timeout, or else investigate why Maven timed out. Java analysis will continue, but the analysis may be of reduced quality.",
3+
"severity": "note",
4+
"source": {
5+
"extractorName": "java",
6+
"id": "java/autobuilder/buildless/maven-timed-out",
7+
"name": "Java analysis timed out running Maven"
8+
},
9+
"visibility": {
10+
"cliSummaryTable": true,
11+
"statusPage": true,
12+
"telemetry": true
13+
}
14+
}
15+
{
16+
"markdownMessage": "Build tool(s) should have been able to provide a recommended classpath but the attempt failed. Extraction will continue, but external dependencies will be inferred from the Java package names used. Consider troubleshooting the build tool error or using a build mode other than 'none'.",
17+
"severity": "note",
18+
"source": {
19+
"extractorName": "java",
20+
"id": "java/autobuilder/buildless/classpath-from-tool-failed",
21+
"name": "Failed to extract dependency information from build tool tool Maven"
22+
},
23+
"visibility": {
24+
"cliSummaryTable": true,
25+
"statusPage": true,
26+
"telemetry": true
27+
}
28+
}
129
{
230
"markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.",
331
"severity": "unknown",
@@ -55,16 +83,16 @@
5583
}
5684
}
5785
{
58-
"markdownMessage": "Reading the dependency graph from build files provided 2 classpath entries",
59-
"severity": "unknown",
86+
"markdownMessage": "Running the Maven plugin `com.github.ferstl:depgraph-maven-plugin:4.0.3-CodeQL:graph` failed. This means precise dependency information will be unavailable, and so dependencies will be guessed based on Java package names. Consider investigating why this plugin fails to run.",
87+
"severity": "note",
6088
"source": {
6189
"extractorName": "java",
62-
"id": "java/autobuilder/buildless/depgraph-provided-by-maven",
63-
"name": "Java analysis extracted precise dependency graph information from tool Maven"
90+
"id": "java/autobuilder/buildless/depgraph-maven-plugin-failed",
91+
"name": "Java buildless mode failed to extract a dependency graph from Maven"
6492
},
6593
"visibility": {
6694
"cliSummaryTable": true,
67-
"statusPage": false,
95+
"statusPage": true,
6896
"telemetry": true
6997
}
7098
}

java/ql/integration-tests/java/buildless-maven-timeout/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ def test(codeql, java):
22
# mvnw has been rigged to stall for a long time by trying to fetch from a black-hole IP. We should find the timeout logic fires and buildless aborts the Maven run quickly.
33
codeql.database.create(
44
build_mode="none",
5-
_env={"CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "10"},
5+
_env={"CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "3"},
66
)

0 commit comments

Comments
 (0)