Skip to content

Commit 2dbce56

Browse files
authored
Introduction of Allocationlayer, new Catalog/Snapshot Logic, PolyValues, new UI/UI-Logic and Various Refactorings (polypheny#464)
1 parent 55a0554 commit 2dbce56

File tree

2,443 files changed

+108389
-193397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,443 files changed

+108389
-193397
lines changed

.github/workflows/integration.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,34 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
adapter: [ mongodb, hsqldb, monetdb, postgresql, file, cottontail, cassandra, neo4j ]
16-
name: Integration Tests (Java 11)
15+
adapter: [ mongodb, hsqldb, monetdb, postgresql, file, cottontail, neo4j ]
16+
name: Integration Tests (Java 17)
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
- name: Set up JDK
21-
uses: actions/setup-java@v3
21+
uses: actions/setup-java@v4
2222
with:
23-
distribution: 'zulu'
24-
java-version: 11
23+
distribution: 'temurin'
24+
java-version: 17
2525
- name: Set env variable
2626
run: |
2727
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
2828
- name: Assemble
29-
uses: nick-invision/retry@v2
29+
uses: nick-fields/retry@v2
3030
with:
31-
max_attempts: 2
31+
max_attempts: 1
3232
timeout_minutes: 60
3333
command: ./gradlew assemble
3434
- name: Build Plugins
35-
uses: nick-invision/retry@v2
35+
uses: nick-fields/retry@v2
3636
with:
3737
max_attempts: 1
3838
timeout_minutes: 60
3939
command: ./gradlew assemblePlugins
40-
4140
- name: Execute integration tests for ${{ matrix.adapter }}
42-
uses: nick-invision/retry@v2
41+
uses: nick-fields/retry@v2
4342
with:
44-
max_attempts: 3
43+
max_attempts: 1
4544
timeout_minutes: 30
46-
command: ./gradlew integrationTests -Dstore.default=${{ matrix.adapter }}
45+
command: ./gradlew integrationTests -Dstore.default=${{ matrix.adapter }}

.github/workflows/matrix.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,35 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
java: [ 11, 15, 17 ]
15+
java: [ 17, 21 ]
1616
os: [ macos-latest, ubuntu-latest, windows-latest ]
1717
name: Java ${{ matrix.java }} @ ${{ matrix.os }}
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Set up JDK
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
24-
distribution: 'zulu'
24+
distribution: 'temurin'
2525
java-version: ${{ matrix.java }}
2626
- name: Set env variable
2727
run: |
2828
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
2929
- name: Assemble
30-
uses: nick-invision/retry@v2
30+
uses: nick-fields/retry@v2
3131
with:
32-
max_attempts: 2
32+
max_attempts: 1
3333
timeout_minutes: 60
3434
command: ./gradlew assemble
3535
- name: Build Plugins
36-
uses: nick-invision/retry@v2
36+
uses: nick-fields/retry@v2
3737
with:
3838
max_attempts: 1
3939
timeout_minutes: 60
4040
command: ./gradlew assemblePlugins
4141
- name: Execute tests
42-
uses: nick-invision/retry@v2
42+
uses: nick-fields/retry@v2
4343
with:
44-
max_attempts: 3
44+
max_attempts: 1
4545
timeout_minutes: 30
46-
command: ./gradlew check
46+
command: ./gradlew check

.github/workflows/plugins.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Polypheny-DB Plugin Matrix CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [ opened, synchronize, reopened, ready_for_review ]
7+
8+
jobs:
9+
build:
10+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
java: [ 17, 21 ]
16+
os: [ macos-latest, ubuntu-latest, windows-latest ]
17+
name: Java ${{ matrix.java }} @ ${{ matrix.os }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Set up JDK
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: 'temurin'
25+
java-version: ${{ matrix.java }}
26+
- name: Set env variable
27+
run: |
28+
echo "POLYPHENY_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
29+
- name: Assemble
30+
uses: nick-fields/retry@v2
31+
with:
32+
max_attempts: 1
33+
timeout_minutes: 60
34+
command: ./gradlew assemble
35+
- name: Build Plugins
36+
uses: nick-fields/retry@v2
37+
with:
38+
max_attempts: 1
39+
timeout_minutes: 60
40+
command: ./gradlew assemblePlugins
41+
- name: Execute tests
42+
uses: nick-fields/retry@v2
43+
with:
44+
max_attempts: 1
45+
timeout_minutes: 30
46+
command: ./gradlew -p plugins test

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ nbdist/
220220
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
221221
!/gradle/wrapper/gradle-wrapper.jar
222222

223-
/geode-adapter/vf.gf.server.status.cmd
224-
/core/custom-schema-model.json
225-
/testTestCsv/**
226223
!/libs/avatica-1.16.0-POLYPHENYDB-shaded.jar
227224
!/libs/avatica-server-1.16.0-POLYPHENYDB.jar
228225
/dbms/target/
229226
/dbms/src/main/resources/acknowledgements.txt
230227

231228
.polypheny/*
229+
230+
## dynamicly generated version information
231+
/dbms/src/main/resources/version.properties

build.gradle

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ buildscript {
1010
classpath group: "io.freefair.gradle", name: "lombok-plugin", version: lombok_version
1111
classpath group: "com.adarshr", name: "gradle-test-logger-plugin", version: gradle_test_logger_version
1212
classpath group: "org.reflections", name: "reflections", version: reflections_version
13+
classpath group: "com.jaredsburrows", name: "gradle-license-plugin", version: license_report_version
1314
}
1415
}
1516

1617

1718
plugins {
18-
id "org.jetbrains.kotlin.jvm" version "1.5.31"
19+
id "java"
1920
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
2021
}
2122

2223

24+
test {
25+
useJUnitPlatform()
26+
}
27+
28+
2329
allprojects {
2430

2531
version = versionMajor + "." + versionMinor + "." + versionMicro
@@ -43,19 +49,22 @@ allprojects {
4349
apply plugin: "java-library"
4450
apply plugin: "io.freefair.lombok"
4551
apply plugin: "com.adarshr.test-logger"
52+
apply plugin: "com.jaredsburrows.license"
4653

4754
compileJava.options.encoding = "UTF-8"
4855
compileTestJava.options.encoding = "UTF-8"
4956
javadoc.options.encoding = "UTF-8"
5057

51-
sourceCompatibility = 1.11
52-
targetCompatibility = 1.11
58+
java {
59+
toolchain {
60+
languageVersion = JavaLanguageVersion.of(17)
61+
}
62+
}
5363

54-
tasks.withType(JavaCompile) {
64+
tasks.withType(JavaCompile).configureEach {
5565
options.encoding = "UTF-8"
5666
}
5767

58-
5968
repositories {
6069
mavenLocal()
6170
mavenCentral()
@@ -71,11 +80,7 @@ allprojects {
7180
}
7281
}
7382

74-
tasks.withType(JavaCompile) {
75-
options.encoding = "UTF-8"
76-
}
77-
78-
configurations.all {
83+
configurations.configureEach {
7984
// check for updates every build
8085
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
8186
}
@@ -92,13 +97,13 @@ allprojects {
9297

9398
String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb'
9499

95-
task integrationTests(type: Test) {
100+
tasks.register('integrationTests', Test) {
96101
description = 'Runs integration tests.'
97102
group = 'verification'
98103
systemProperty 'store.default', storeName
99-
useJUnit {
100-
includeCategories 'org.polypheny.db.AdapterTestSuite'
101-
excludeCategories 'org.polypheny.db.excluded.' + storeName.capitalize() + "Excluded"
104+
useJUnitPlatform {
105+
includeTags("adapter")
106+
excludeTags(storeName.toLowerCase() + "Excluded")
102107
}
103108
shouldRunAfter(tasks.named('test'))
104109
}
@@ -133,8 +138,19 @@ allprojects {
133138
testCompileOnly(group: 'org.pf4j', name: 'pf4j', version: pf4j_version) {
134139
exclude group: "org.slf4j"
135140
}
141+
testImplementation(group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junit_jupiter_version)
142+
}
143+
144+
test {
145+
useJUnitPlatform()
136146
}
137147

148+
licenseReport {
149+
generateJsonReport = true
150+
generateCsvReport = false
151+
generateHtmlReport = false
152+
generateTextReport = false
153+
}
138154

139155
idea {
140156
module {
@@ -152,23 +168,53 @@ allprojects {
152168

153169
}
154170

171+
tasks.register('gatherLicenseReports', Copy) {
172+
// Define the destination directory for the reports
173+
def destinationDir = "${rootProject.buildDir}/reports/licenses"
174+
175+
// Go through each subproject
176+
subprojects.each { subproject ->
177+
from("${subproject.buildDir}/reports/licenses") {
178+
include 'licenseReport.json'
179+
// Rename the report file to include the module name
180+
rename { String fileName ->
181+
"${subproject.name}-$fileName"
182+
}
183+
}
184+
}
185+
186+
// Set the destination for the copied files
187+
into destinationDir
188+
}
189+
gradle.projectsEvaluated { // Make sure the task runs after all projects are evaluated
190+
gatherLicenseReports.dependsOn subprojects*.tasks*.findByName('licenseReport')
191+
}
192+
155193
// plugin location
156194
ext.pluginsDir = rootProject.buildDir.path + '/plugins'
157195

196+
158197
build {
159198
dependsOn(":plugins:build")
160199
}
161200

201+
allprojects {
202+
test.dependsOn(":plugins:assemblePlugins")
203+
}
204+
162205

163206
idea {
164207
project {
165208
settings {
166209
runConfigurations {
167210
"Polypheny-DB"(Gradle) {
168-
taskNames = ["assemblePlugins", "run"]
211+
taskNames = ["assemblePlugins", "runDev"]
169212
}
170213
"Polypheny-DB (reset)"(Gradle) {
171-
taskNames = ["assemblePlugins", ":dbms:runReset"]
214+
taskNames = ["assemblePlugins", ":dbms:runDevReset"]
215+
}
216+
"Polypheny-DB (production)"(Gradle) {
217+
taskNames = ["assemblePlugins", "run"]
172218
}
173219
}
174220
copyright {

config/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ group "org.polypheny"
22

33

44
dependencies {
5-
implementation group: "io.javalin", name: "javalin", version: javalin_version // Apache 2.0
5+
implementation(group: "io.javalin", name: "javalin", version: javalin_version) {
6+
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
7+
}// Apache 2.0
68

79
implementation group: "com.google.code.gson", name: "gson", version: gson_version // Apache 2.0
810

@@ -19,15 +21,14 @@ dependencies {
1921

2022
// --- Test Compile ---
2123
testImplementation project(path: ":core", configuration: "tests")
22-
testImplementation group: "junit", name: "junit", version: junit_version
24+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: junit_jupiter_version
2325
}
2426

2527

2628
sourceSets {
2729
main {
2830
java {
2931
srcDirs = ["src/main/java"]
30-
outputDir = file(project.buildDir.absolutePath + "/classes")
3132
}
3233
resources {
3334
srcDirs = ["src/main/resources"]
@@ -37,7 +38,7 @@ sourceSets {
3738
test {
3839
java {
3940
srcDirs = ["src/test/java"]
40-
outputDir = file(project.buildDir.absolutePath + "/test-classes")
41+
destinationDirectory.set(file(project.buildDir.absolutePath + "/test-classes"))
4142
}
4243
resources {
4344
srcDirs = ["src/test/resources"]

config/src/main/java/org/polypheny/db/config/ConfigClazz.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 The Polypheny Project
2+
* Copyright 2019-2024 The Polypheny Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -187,7 +187,7 @@ public Set<Class> read( final JsonReader in ) throws IOException {
187187
}
188188

189189

190-
class ValueAdapter extends TypeAdapter<Class> {
190+
static class ValueAdapter extends TypeAdapter<Class> {
191191

192192
@Override
193193
public void write( final JsonWriter out, final Class value ) throws IOException {

config/src/main/java/org/polypheny/db/config/ConfigClazzList.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 The Polypheny Project
2+
* Copyright 2019-2024 The Polypheny Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -194,7 +194,7 @@ void setValueFromFile( final com.typesafe.config.Config conf ) {
194194
@Override
195195
public boolean parseStringAndSetValue( String value ) {
196196
Gson gson = new Gson();
197-
ArrayList<String> val = gson.fromJson( value, ArrayList.class );
197+
List<String> val = gson.fromJson( value, List.class );
198198
List<Class> toAdd = new ArrayList<>();
199199
for ( Class c : classes ) {
200200
if ( val.contains( c.getName() ) ) {
@@ -215,7 +215,7 @@ private Class getByString( String str ) throws ConfigRuntimeException {
215215
}
216216

217217

218-
class ValueAdapter extends TypeAdapter<List<Class>> {
218+
static class ValueAdapter extends TypeAdapter<List<Class>> {
219219

220220
@Override
221221
public void write( final JsonWriter out, final List<Class> classes ) throws IOException {

0 commit comments

Comments
 (0)