Skip to content

Commit

Permalink
Merge pull request #321 from RADAR-base/release-0.8.2
Browse files Browse the repository at this point in the history
Release 0.8.2
  • Loading branch information
blootsvoets committed Nov 30, 2022
2 parents 06d32ea + 5278251 commit 45d8c8a
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 994 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/scheduled_snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Snyk scheduled test
on:
schedule:
- cron: '0 2 * * 1'
push:
branches:
- master

jobs:
security:
runs-on: ubuntu-latest
Expand All @@ -17,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.931.0
snyk-version: v1.1032.0

- uses: actions/setup-java@v3
with:
Expand All @@ -34,13 +38,15 @@ jobs:
snyk test
--all-sub-projects
--configuration-matching='^runtimeClasspath$'
--fail-on=upgradable
--json-file-output=${{ env.REPORT_FILE }}
--org=radar-base
--policy-path=$PWD/.snyk
- name: Report new vulnerabilities
uses: thehyve/report-vulnerability@master
if: success() || failure()
with:
report-file: ${{ env.REPORT_FILE }}
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ failure() }}
6 changes: 3 additions & 3 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- master

jobs:
security:
runs-on: ubuntu-latest
Expand All @@ -15,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.931.0
snyk-version: v1.1032.0

- uses: actions/setup-java@v3
with:
Expand All @@ -32,6 +33,5 @@ jobs:
snyk test
--all-sub-projects
--configuration-matching='^runtimeClasspath$'
--fail-on=upgradable
--org=radar-base
--severity-threshold=high
--policy-path=$PWD/.snyk
4 changes: 2 additions & 2 deletions java-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

allprojects {
version = "0.8.1"
version = "0.8.2"
group = "org.radarbase"
}

Expand Down Expand Up @@ -126,7 +126,7 @@ nexusPublishing {
}

tasks.wrapper {
gradleVersion = "7.5.1"
gradleVersion = "7.6"
}

/** Set the given Java [version] for compiled Java and Kotlin code. */
Expand Down
18 changes: 8 additions & 10 deletions java-sdk/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

kotlinVersion=1.7.20
dokkaVersion=1.7.10
kotlinVersion=1.7.22
dokkaVersion=1.7.20
nexusPluginVersion=1.1.0
dependencyUpdateVersion=0.42.0
jacksonVersion=2.13.4
dependencyUpdateVersion=0.44.0
jacksonVersion=2.14.1
avroGeneratorVersion=1.5.0

avroVersion=1.11.1
argparseVersion=0.9.0
radarJerseyVersion=0.9.0
radarJerseyVersion=0.9.1
junitVersion=5.9.1
confluentVersion=7.2.2
kafkaVersion=7.2.2-ce
confluentVersion=7.3.0
kafkaVersion=7.3.0-ce
okHttpVersion=4.10.0
radarCommonsVersion=0.15.0
slf4jVersion=2.0.3
slf4jVersion=2.0.5
javaxValidationVersion=2.0.1.Final
jsoupVersion=1.15.3
log4j2Version=2.19.0
nettyVersion=4.1.82.Final
jettyVersion=9.4.48.v20220622
Binary file modified java-sdk/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion java-sdk/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions java-sdk/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions java-sdk/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class SourceCatalogueServer(private val serverPort: Int) : Closeable {
}
val config = loadConfig(parsedArgs.getString("config"))
val sourceCatalogue: SourceCatalogue = try {
load(Paths.get(parsedArgs.getString("root")), config.schemas)
load(
Paths.get(parsedArgs.getString("root")),
schemaConfig = config.schemas,
sourceConfig = config.sources,
)
} catch (e: IOException) {
logger.error("Failed to load source catalogue", e)
logger.error(parser.formatUsage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.radarbase.schema.specification.SourceCatalogue;
import org.radarbase.schema.specification.config.SchemaConfig;
import org.radarbase.schema.specification.config.SourceConfig;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand All @@ -27,7 +29,7 @@ public void setUp() {
server = new SourceCatalogueServer(9876);
serverThread = new Thread(() -> {
try {
SourceCatalogue sourceCatalog = SourceCatalogue.Companion.load(Paths.get("../.."));
SourceCatalogue sourceCatalog = SourceCatalogue.Companion.load(Paths.get("../.."), new SchemaConfig(), new SourceConfig());
server.start(sourceCatalog);
} catch (IllegalStateException e) {
// this is acceptable
Expand Down
2 changes: 1 addition & 1 deletion java-sdk/radar-schemas-commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

// Generated avro files
val avroOutputDir = file("src/generated/java")
val avroOutputDir = file("$projectDir/src/generated/java")

description = "RADAR Schemas Commons SDK"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ class SourceCatalogue internal constructor(
* @throws IOException if the source catalogue could not be read.
*/
@Throws(IOException::class, InvalidPathException::class)
@JvmOverloads
fun load(
root: Path,
schemaConfig: SchemaConfig = SchemaConfig(),
sourceConfig: SourceConfig = SourceConfig(),
schemaConfig: SchemaConfig,
sourceConfig: SourceConfig,
): SourceCatalogue {
val specRoot = root.resolve(SPECIFICATIONS_PATH)
val mapper = ObjectMapper(YAMLFactory()).apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.radarbase.schema.Scope;
import org.radarbase.schema.specification.SourceCatalogue;
import org.radarbase.schema.specification.config.SchemaConfig;
import org.radarbase.schema.specification.config.SourceConfig;

import java.io.IOException;
import java.nio.file.Path;
Expand Down Expand Up @@ -115,7 +116,7 @@ public void connectorSpecifications() throws IOException {
}

private void testFromSpecification(Scope scope) throws IOException {
SourceCatalogue sourceCatalogue = SourceCatalogue.Companion.load(ROOT);
SourceCatalogue sourceCatalogue = SourceCatalogue.Companion.load(ROOT, new SchemaConfig(), new SourceConfig());
String result = SchemaValidator.format(
validator.analyseSourceCatalogue(scope, sourceCatalogue));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.opentest4j.MultipleFailuresError;
import org.radarbase.schema.specification.DataProducer;
import org.radarbase.schema.specification.SourceCatalogue;
import org.radarbase.schema.specification.config.SchemaConfig;
import org.radarbase.schema.specification.config.SourceConfig;

import java.io.IOException;
import java.nio.file.Path;
Expand All @@ -48,7 +50,7 @@ public class SourceCatalogueValidationTest {

@BeforeAll
public static void setUp() throws IOException {
catalogue = SourceCatalogue.Companion.load(BASE_PATH);
catalogue = SourceCatalogue.Companion.load(BASE_PATH, new SchemaConfig(), new SourceConfig());
}

@Test
Expand Down
10 changes: 2 additions & 8 deletions java-sdk/radar-schemas-registration/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ dependencies {
val radarCommonsVersion: String by project
api("org.radarbase:radar-commons-server:$radarCommonsVersion")

val nettyVersion: String by project
implementation(platform("io.netty:netty-bom:$nettyVersion"))
val jettyVersion: String by project
implementation(platform("org.eclipse.jetty:jetty-bom:$jettyVersion"))

val confluentVersion: String by project
implementation("io.confluent:kafka-connect-avro-converter:$confluentVersion")
implementation("io.confluent:kafka-schema-registry:$confluentVersion") {
exclude(group = "org.slf4j", module = "slf4j-reload4j")
}
implementation("io.confluent:kafka-schema-registry-client:$confluentVersion")

val kafkaVersion: String by project
implementation("org.apache.kafka:connect-json:$kafkaVersion")

Expand Down

This file was deleted.

Loading

0 comments on commit 45d8c8a

Please sign in to comment.