Skip to content

Commit 6bb3712

Browse files
committed
Migrate to Neo4j 2025.03.0
1 parent ce949f1 commit 6bb3712

18 files changed

+564
-35
lines changed

.github/workflows/public-analyze-code-graph.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ on:
3737
analysis-arguments:
3838
description: >
3939
The arguments to pass to the analysis script.
40-
Default: '--profile Neo4jv5-low-memory'
40+
Default: '--profile Neo4j-latest-low-memory'
4141
required: false
4242
type: string
43-
default: '--profile Neo4jv5-low-memory'
43+
default: '--profile Neo4j-latest-low-memory'
4444
typescript-scan-heap-memory:
4545
description: >
4646
The heap memory size in MB to use for the TypeScript code scans (default=4096).

COMMANDS.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ The [analyze.sh](./scripts/analysis/analyze.sh) command comes with these command
6767

6868
- `--report Csv` only generates CSV reports. This speeds up the report generation and doesn't depend on Python, Jupyter Notebook or any other related dependencies. The default value os `All` to generate all reports. `Jupiter` will only generate Jupyter Notebook reports. `DatabaseCsvExport` exports the whole graph database as a CSV file (performance intense, check if there are security concerns first).
6969

70-
- `--profile Neo4jv4` uses the older long term support (june 2023) version v4.4.x of Neo4j and suitable compatible versions of plugins and JQAssistant. `Neo4jv5` will explicitly select the newest (june 2023) version 5.x of Neo4j. Without setting
71-
a profile, the newest versions will be used. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
70+
- `--profile Neo4jv4` uses the older long term support (june 2023) version v4.4.x of Neo4j and suitable compatible versions of plugins and JQAssistant. Without specifying a profile, the newest versions will be used. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
7271

73-
- `--profile Neo4jv5-continue-on-scan-errors` is based on the default profile (`Neo4jv5`) but uses the jQAssistant configuration template [template-neo4jv5-jqassistant-continue-on-error.yaml](./scripts/configuration/template-neo4jv5-jqassistant-continue-on-error.yaml) to continue on scan error instead of failing fast. This is temporarily useful when there is a known error that needs to be ignored. It is still recommended to use the default profile and fail fast if there is something wrong. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
72+
- `--profile Neo4jv5` uses the older long term support (march 2025) version v5.26.x of Neo4j and suitable compatible versions of plugins and JQAssistant. Without specifying a profile, the newest versions will be used. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
7473

75-
- `--profile Neo4jv5-low-memory` is based on the default profile (`Neo4jv5`) but uses only half of the memory (RAM) as configured in [template-neo4j-low-memory.conf](./scripts/configuration/template-neo4j-low-memory.conf). This is useful for the analysis of smaller codebases with less resources. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
74+
- `--profile Neo4j-latest-continue-on-scan-errors` is based on the default profile (`Neo4j-latest`) but uses the jQAssistant configuration template [template-neo4j-remote-jqassistant-continue-on-error.yaml](./scripts/configuration/template-neo4j-remote-jqassistant-continue-on-error.yaml) to continue on scan error instead of failing fast. This is temporarily useful when there is a known error that needs to be ignored. It is still recommended to use the default profile and fail fast if there is something wrong. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
75+
76+
- `--profile Neo4j-latest-low-memory` is based on the default profile (`Neo4j-latest`) but uses only half of the memory (RAM) as configured in [template-neo4j-low-memory.conf](./scripts/configuration/template-neo4j-low-memory.conf). This is useful for the analysis of smaller codebases with less resources. Other profiles can be found in the directory [scripts/profiles](./scripts/profiles/).
7677

7778
- `--explore` activates the "explore" mode where no reports are generated. Furthermore, Neo4j won't be stopped at the end of the script and will therefore continue running. This makes it easy to just set everything up but then use the running Neo4j server to explore the data manually.
7879

INTEGRATION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The workflow parameters are as follows:
3636
- **sources-upload-name**: The name of the sources uploaded with [actions/upload-artifact](https://github.com/actions/upload-artifact/tree/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08) containing the content of the 'source' directory for the analysis. It also supports sub-folders for multiple source code bases. This parameter is optional and defaults to an empty string.
3737
Please use 'include-hidden-files: true' if you also want to upload the git history.
3838
- **ref**: The branch, tag, or SHA of the code-graph-analysis-pipeline to checkout. This parameter is optional and defaults to "main".
39-
- **analysis-arguments**: The arguments to pass to the analysis script. This parameter is optional and defaults to '--profile Neo4jv5-low-memory'. You can find all available options in section [Command Line Options of COMMANDS.md/](./COMMANDS.md#command-line-options).
39+
- **analysis-arguments**: The arguments to pass to the analysis script. This parameter is optional and defaults to '--profile Neo4j-latest-low-memory'. You can find all available options in section [Command Line Options of COMMANDS.md/](./COMMANDS.md#command-line-options).
4040
- **typescript-scan-heap-memory**: The heap memory size in MB to use for the TypeScript code scans. This value is only used for the TypeScript code scans and is ignored for other scans. This parameter is optional and defaults to '4096'. It will set the environment variable `TYPESCRIPT_SCAN_HEAP_MEMORY` which leads to `NODE_OPTIONS` set to `--max-old-space-size=4096` for TypeScript scans. See [Questions and Answers of README.md](./README.md#thinking-questions--answers) for more information.
4141

4242
The workflow also provides an output parameter:

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,17 @@ The [Code Structure Analysis Pipeline](./.github/workflows/internal-java-code-an
259259
```
260260

261261
- How can i continue on errors when scanning Typescript projects instead of cancelling the whole analysis?
262-
👉 Use the profile `Neo4jv5-continue-on-scan-errors` (default = `Neo4jv5`):
262+
👉 Use the profile `Neo4j-latest-continue-on-scan-errors` (default = `Neo4j-latest`):
263263

264264
```shell
265-
./../../scripts/analysis/analyze.sh --profile Neo4jv5-continue-on-scan-errors
265+
./../../scripts/analysis/analyze.sh --profile Neo4j-latest-continue-on-scan-errors
266266
```
267267

268268
- How can i reduce the memory (RAM) consumption?
269-
👉 Use the profile `Neo4jv5-low-memory` (default = `Neo4jv5`):
269+
👉 Use the profile `Neo4j-latest-low-memory` (default = `Neo4j-latest`):
270270

271271
```shell
272-
./../../scripts/analysis/analyze.sh --profile Neo4jv5-low-memory
272+
./../../scripts/analysis/analyze.sh --profile Neo4j-latest-low-memory
273273
```
274274

275275
## 🕸 Web References

renovate.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"description": "Update NEO4J_VERSION constant in shell scripts",
7777
"customType": "regex",
7878
"fileMatch": [
79-
"^scripts/profiles/Neo4jv5.*\\.sh$",
79+
"^scripts/profiles/Neo4j-latest.*\\.sh$",
8080
"^scripts/profiles/Default\\.sh$",
8181
"^scripts/[^/]*\\.sh$"
8282
],
@@ -90,7 +90,7 @@
9090
"description": "Update NEO4J_APOC_PLUGIN_VERSION constant in shell scripts",
9191
"customType": "regex",
9292
"fileMatch": [
93-
"^scripts/profiles/Neo4jv5.*\\.sh$",
93+
"^scripts/profiles/Neo4j-latest.*\\.sh$",
9494
"^scripts/profiles/Default\\.sh$",
9595
"^scripts/[^/]*\\.sh$"
9696
],
@@ -104,7 +104,7 @@
104104
"description": "Update NEO4J_GDS_PLUGIN_VERSION constant in shell scripts",
105105
"customType": "regex",
106106
"fileMatch": [
107-
"^scripts/profiles/Neo4jv5.*\\.sh$",
107+
"^scripts/profiles/Neo4j-latest.*\\.sh$",
108108
"^scripts/profiles/Default\\.sh$",
109109
"^scripts/[^/]*\\.sh$"
110110
],
@@ -118,7 +118,7 @@
118118
"description": "Update NEO4J_OPEN_GDS_PLUGIN_VERSION constant in shell scripts",
119119
"customType": "regex",
120120
"fileMatch": [
121-
"^scripts/profiles/Neo4jv5.*\\.sh$",
121+
"^scripts/profiles/Neo4j-latest.*\\.sh$",
122122
"^scripts/profiles/Default\\.sh$",
123123
"^scripts/[^/]*\\.sh$"
124124
],
@@ -134,7 +134,7 @@
134134
"description": "Update JQASSISTANT_CLI_VERSION constant in shell scripts",
135135
"customType": "regex",
136136
"fileMatch": [
137-
"^scripts/profiles/Neo4jv5.*\\.sh$",
137+
"^scripts/profiles/Neo4j-latest.*\\.sh$",
138138
"^scripts/profiles/Default\\.sh$",
139139
"^scripts/[^/]*\\.sh$"
140140
],

scripts/analysis/analyze.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Note: The argument "--profile" is optional. The default value is "Default".
1919
# It selects a settings profile that sets all suitable variables for the analysis.
20-
# This makes it possible to run an analysis with e.g. Neo4j v4 instead of v5. Further profiles might come in future.
20+
# This makes it possible to run an analysis with e.g. Neo4j v4 or v5. Further profiles might come in future.
2121
# Implemented is this as a script in "scripts/profiles" that starts with the settings profile name followed by ".sh".
2222

2323
# Note: The argument "--explore" is optional. It is a switch that is deactivated by default.
@@ -28,7 +28,7 @@
2828
# when it comes to subsequent executions.
2929
# Existing downloads, installations, scans and processes will be detected.
3030

31-
# Requires setupNeo4j.sh,setupJQAssistant.sh,startNeo4j.sh,resetAndScanChanged.sh,prepareAnalysis.sh,stopNeo4j.sh,comilations/*.sh,profiles/*.sh
31+
# Requires setupNeo4j.sh,setupJQAssistant.sh,startNeo4j.sh,resetAndScanChanged.sh,prepareAnalysis.sh,stopNeo4j.sh,compilations/*.sh,profiles/*.sh
3232

3333
# Fail on any error ("-e" = exit on first error, "-o pipefail" exist on errors within piped commands)
3434
set -o errexit -o pipefail
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
jqassistant:
2+
# Controls whether the execution of jQAssistant shall be skipped
3+
#
4+
# -Djqassistant.skip: true|false
5+
skip: false
6+
7+
# Defines the local and remote Maven repositories for retrieving additional plugins.
8+
repositories:
9+
# The path to the local repository.
10+
#
11+
# -Djqassistant.repositories.local (optional)
12+
local: ./../downloads/jqassistant-repository
13+
14+
# The list of plugins to load and activate.
15+
#
16+
# Each plugin is identified using its Maven coordinates:
17+
#
18+
# -Djqassistant.plugins[0].group-id
19+
# -Djqassistant.plugins[0].artifact-id
20+
# -Djqassistant.plugins[0].version
21+
# -Djqassistant.plugins[0].classifier (optional)
22+
# -Djqassistant.plugins[0].type (optional)
23+
#plugins:
24+
# - group-id:
25+
# artifact-id:
26+
# version:
27+
# classifier:
28+
# type:
29+
plugins:
30+
- group-id: org.jqassistant.plugin.typescript
31+
artifact-id: jqassistant-typescript-plugin
32+
version: 1.4.0-M2
33+
- group-id: org.jqassistant.plugin
34+
artifact-id: jqassistant-npm-plugin
35+
version: 2.1.0
36+
- group-id: de.kontext-e.jqassistant.plugin
37+
artifact-id: jqassistant.plugin.git
38+
version: 2.4.0
39+
40+
41+
# The store configuration
42+
store:
43+
# URI of the database to connect to. Supported URI schemes are 'file' for embedded databases and 'bolt' for connecting to a running Neo4j instance (3.x+), e.g.
44+
#
45+
# -Djqassistant.store.uri
46+
#uri: file://target/jqassistant/store
47+
uri: bolt://localhost:${NEO4J_BOLT_PORT:7687}
48+
49+
# Settings for the embedded Neo4j store
50+
embedded:
51+
# Enable the HTTP and BOLT connector for the embedded store
52+
#
53+
# -Djqassistant.store.embedded.connector-enabled: true|false
54+
connector-enabled: false
55+
56+
# The listen address for the HTTP and BOLT connectors
57+
#
58+
# -Djqassistant.store.embedded.listen-address
59+
listen-address: localhost
60+
61+
# The BOLT connector port
62+
#
63+
# -Djqassistant.store.embedded.bolt-port
64+
bolt-port: 7687
65+
66+
# The HTTP connector port
67+
#
68+
# -Djqassistant.store.embedded.http-port: 7474
69+
http-port: 7474
70+
71+
# Settings for connecting to a remote Neo4j store
72+
remote:
73+
# The user name for authentication.
74+
#
75+
# -Djqassistant.store.username
76+
username: ${NEO4J_USER:neo4j}
77+
78+
# The password for authentication.
79+
#
80+
# -Djqassistant.store.password
81+
password: ${NEO4J_INITIAL_PASSWORD}
82+
83+
# Activate encryption level for 'bolt' connections.
84+
#
85+
# -Djqassistant.store.encryption: true|false
86+
encryption: false
87+
88+
#The trust strategy for 'bolt' connections
89+
#
90+
# -Djqassistant.store.trust-strategy: trustAllCertificates|trustCustomCaSignedCertificates|trustSystemCaSignedCertificates
91+
trust-strategy: trustAllCertificates
92+
93+
# The file containing the custom CA certificate for trust strategy.
94+
#
95+
# -Djqassistant.store.trust-certificate
96+
trust-certificate:
97+
98+
# Additional properties to be passed to the remote store as key-value pairs.
99+
#
100+
# -Djqassistant.store.properties
101+
properties:
102+
103+
# The Scanner configuration
104+
scan:
105+
# Indicates whether to initially reset the store (i.e. clear all nodes and relationships) before scanning.
106+
#
107+
# -Djqassistant.scan.reset: true|false
108+
reset: true
109+
110+
# Specifies if a scan shall be continued if an error is encountered.
111+
#
112+
# -Djqassistant.scan.continue-on-error: true|false
113+
continue-on-error: true
114+
115+
# The items to include for scanning.
116+
include:
117+
# A list of files to include.
118+
#
119+
#jqassistant.scan.include.files[0]
120+
files:
121+
# - src/folder
122+
123+
# A list of URLs to include.
124+
#
125+
#jqassistant.scan.include.urls[0]
126+
urls:
127+
# - maven:repository::https://nexus/repository
128+
129+
# The properties to configure scanner plugins as key-value pairs. The supported properties are plugin specific.
130+
#
131+
# -Djqassistant.scan.properties
132+
properties:
133+
# plugin.property.key: value
134+
file.exclude: "*/.DS_Store"
135+
json.file.exclude: "*/.reports/jqa/ts-output.json"
136+
137+
# The analyze configuration
138+
analyze:
139+
# The rule configuration
140+
rule:
141+
# The name of the directory containing project rules.
142+
#
143+
# -Djqassistant.analyze.rule.directory
144+
directory: jqassistant/rules
145+
146+
# The default severity of concepts without an explicit severity.
147+
#
148+
# -Djqassistant.analyze.rule.default-concept-severity: INFO|MINOR|MAJOR|CRITICAL|BLOCKER
149+
default-concept-severity: MINOR
150+
151+
# The default severity of constraint without an explicit severity.
152+
#
153+
# -Djqassistant.analyze.rule.default-constraint-severity: INFO|MINOR|MAJOR|CRITICAL|BLOCKER
154+
default-constraint-severity: MAJOR
155+
156+
# The default severity of groups without an explicit severity.
157+
#
158+
# -Djqassistant.analyze.rule.default-group-severity: INFO|MINOR|MAJOR|CRITICAL|BLOCKER
159+
default-group-severity:
160+
161+
# The report configuration
162+
report:
163+
# The properties to configure report plugins. The supported properties are plugin specific.
164+
#
165+
# -Djqassistant.analyze.report.properties
166+
properties:
167+
# plugin.property.key: value
168+
169+
# Determines the severity level for reporting a warning.
170+
#
171+
# -Djqassistant.analyze.report.warn-on-severity: INFO|MINOR|MAJOR|CRITICAL|BLOCKER|NEVER
172+
warn-on-severity: MINOR
173+
174+
# Determines the severity level for reporting a failure.
175+
#
176+
# -Djqassistant.analyze.report.fail-on-severity: INFO|MINOR|MAJOR|CRITICAL|BLOCKER|NEVER
177+
fail-on-severity: MAJOR
178+
179+
# Determines if jQAssistant shall continue the build if failures have been detected.
180+
#
181+
# -Djqassistant.analyze.report.continue-on-failure: true|false
182+
continue-on-failure: false
183+
184+
# Create an archive containing all generated reports.
185+
#
186+
# -Djqassistant.analyze.report.create-archive: true|false
187+
create-archive: false
188+
189+
# Output directory for analysis reports
190+
directory: ./runtime/jqassistant/report
191+
192+
# The concepts to be applied.
193+
#
194+
# -Djqassistant.analyze.concepts[0]
195+
# https://github.com/jQAssistant/jqa-java-plugin/blob/e17fc3032fb0d4258d4f5ca0c64099a6c789c070/src/main/asciidoc/release-notes.adoc#L9
196+
concepts:
197+
- java-classpath:Resolve
198+
- java:PackageDependency
199+
- java:ArtifactDependency
200+
- java:JavaVersion
201+
202+
# The constraints to be validated.
203+
#
204+
# -Djqassistant.analyze.constraints[0]
205+
constraints:
206+
# - my-constraint
207+
208+
# The groups to be executed.
209+
#
210+
# -Djqassistant.analyze.groups[0]
211+
groups:
212+
# - spring-boot:Default
213+
214+
# The parameters to be passed to the executed rules.
215+
#
216+
# -Djqassistant.analyze.rule-parameters."parameterName"
217+
rule-parameters:
218+
# parameterName: value
219+
220+
# Execute concepts even if they have already been applied before
221+
#
222+
# -Djqassistant.analyze.execute-applied-concepts: true|false
223+
execute-applied-concepts: false
224+
225+
# The execution time [seconds] for rules (concepts/constraints) to show a warning. Can be used as a hint for optimization.
226+
#
227+
# -Djqassistant.analyze.warn-on-rule-execution-time-seconds
228+
warn-on-rule-execution-time-seconds: 5

0 commit comments

Comments
 (0)