Skip to content

Commit

Permalink
Bump corfu version to 0.4.2.1 (#269)
Browse files Browse the repository at this point in the history
* Bump corfu version to 0.4.2.1

* Upgrade JDK to 11 in actions

* Disable auto run of upgrade test as it was meant for LRv2 only

* use setup-java v4 in action

* miscellaneous
  • Loading branch information
chetangudisagar authored May 6, 2024
1 parent 70aa5d2 commit ce3989c
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cloud-upgrade-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Corfu Cluster Test

on: push
on: workflow_dispatch

jobs:
upgrade-test:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-universe-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'corretto'
java-version: '11'
check-latest: true
cache-dependency-path: '**/pom.xml'

- name: Cache local Gradle repository
uses: actions/cache@v2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pull_request_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'corretto'
java-version: '11'
check-latest: true
cache-dependency-path: '**/pom.xml'

- name: Cache local Gradle repository
uses: actions/cache@v2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pull_request_universe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'corretto'
java-version: '11'
check-latest: true
cache-dependency-path: '**/pom.xml'

- name: Cache local Gradle repository
uses: actions/cache@v2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/run_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'corretto'
java-version: '11'
check-latest: true
cache-dependency-path: '**/pom.xml'

- name: Cache local Gradle repository
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apply(from = "${gradleScriptsDir}/gradle/idea.gradle")
version = "1.0.0"

val corfuVersion = project.ext["corfuVersion"] as String
val nettyVersion = project.ext["nettyVersion"] as String
val nettyTcnativeVersion = project.ext["nettyTcnativeVersion"] as String
val assertjVersion = project.ext["assertjVersion"] as String
val lombokVersion = project.ext["lombokVersion"] as String
val jmhSdkVersion = project.ext["jmhVersion"] as String
Expand All @@ -57,7 +57,7 @@ dependencies {
implementation("org.corfudb:runtime:${corfuVersion}") {
exclude(group = "io.netty", module = "netty-tcnative")
}
implementation("io.netty:netty-tcnative:${nettyVersion}:${osdetector.os}-${osdetector.arch}")
implementation("io.netty:netty-tcnative:${nettyTcnativeVersion}:${osdetector.os}-${osdetector.arch}")

jmh("org.openjdk.jmh:jmh-core:${jmhSdkVersion}")
jmh("org.openjdk.jmh:jmh-generator-annprocess:${jmhSdkVersion}")
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="severity" value="ignore"/>
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -287,12 +288,14 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private String getAppVersion() {
//https://docs.gradle.org/current/dsl/org.gradle.api.tasks.SourceSetOutput.html

//return new UniverseAppUtil().getAppVersion();
return "0.4.0-SNAPSHOT";
return "0.4.2.1-SNAPSHOT";
}
}
}
2 changes: 1 addition & 1 deletion cloud/corfu/install_corfu_helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

helm install corfu corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.0-SNAPSHOT
helm install corfu corfu --set tls.enabled=false --set tls.certificate.enabled=false --set global.replicas=3 --set image.repository=corfudb/corfu-server --set image.tag=0.4.2.1-SNAPSHOT
4 changes: 4 additions & 0 deletions cloud/infrastructure/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="severity" value="ignore"/>
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -287,12 +288,14 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand All @@ -301,6 +304,7 @@
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
<property name="severity" value="ignore"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
Expand Down
4 changes: 4 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="severity" value="ignore"/>
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -287,12 +288,14 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand All @@ -301,6 +304,7 @@
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
<property name="severity" value="ignore"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
Expand Down
4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ configurations.all {

ext {
logbackVersion = "1.2.3"
corfuVersion = "0.4.0-SNAPSHOT"
corfuVersion = "0.4.2.1-SNAPSHOT"
protobufVersion = "3.11.1"
nettyVersion = "2.0.25.Final"
nettyTcnativeVersion = "2.0.60.Final"
assertjVersion = "3.14.0"
junitVersion = "5.5.2"
lombokVersion = "1.18.18"
Expand Down
4 changes: 2 additions & 2 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
group = 'org.corfudb'

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

withJavadocJar()
withSourcesJar()
Expand Down
4 changes: 2 additions & 2 deletions tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apply(from="${gradleScriptsDir}/gradle/idea.gradle")
version = "1.0.0"

val corfuVersion = project.ext["corfuVersion"]
val nettyVersion = project.ext["nettyVersion"]
val nettyTcnativeVersion = project.ext["nettyTcnativeVersion"]
val assertjVersion = project.ext["assertjVersion"]
val lombokVersion = project.ext["lombokVersion"]

Expand Down Expand Up @@ -65,7 +65,7 @@ dependencies {
exclude(group="io.netty", module="netty-tcnative")
}

implementation("io.netty:netty-tcnative:${nettyVersion}:${osdetector.os}-${osdetector.arch}")
implementation("io.netty:netty-tcnative:${nettyTcnativeVersion}:${osdetector.os}-${osdetector.arch}")

implementation("org.assertj:assertj-core:${assertjVersion}")

Expand Down
4 changes: 4 additions & 0 deletions tests/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="severity" value="ignore"/>
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -287,12 +288,14 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand All @@ -301,6 +304,7 @@
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
<property name="severity" value="ignore"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/docs/compatibility-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The diagram below describes the compatibility test action in CorfuDB, which is r
The basic idea is instead of using cloud hosted Corfu client/server versions, we use the specific versions build locally.

1. Prepare Corfu server docker image(s):
* In CorfuDB repo, switch to the version (git branch/commit) you want, change the version tag specified in pom file (0.4.0-SNAPSHOT for example), run prepare corfu docker image:
* In CorfuDB repo, switch to the version (git branch/commit) you want, change the version tag specified in pom file (0.0.0.0-SNAPSHOT for example), run prepare corfu docker image:
```shell script
./mvnw clean install -Pdocker -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip -T 1C
```
Expand Down
2 changes: 1 addition & 1 deletion tests/src/main/resources/universe-tests.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
corfu.cluster.name=static_cluster
corfu.server.jar=build
corfu.server.initialPort=9000
server.version=0.4.0-SNAPSHOT
server.version=0.4.2.1-SNAPSHOT
test.data.clean=true
4 changes: 4 additions & 0 deletions universe/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="severity" value="ignore"/>
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -287,12 +288,14 @@
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
<property name="severity" value="ignore"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand All @@ -301,6 +304,7 @@
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
<property name="severity" value="ignore"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
Expand Down
2 changes: 1 addition & 1 deletion universe/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM corfudb/corfu-server:0.4.0-SNAPSHOT
FROM corfudb/corfu-server:0.4.2.1-SNAPSHOT

RUN apk update && apk add openssh openssl openrc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ public void collectLogs() {

log.debug("Collect logs for: {}", appParams().getName());

try (LogStream stream = dockerManager.logs()) {
try {
LogStream stream = dockerManager.logs();
String logs = stream.readFully();

if (StringUtils.isEmpty(logs)) {
Expand All @@ -256,6 +257,7 @@ public void collectLogs() {
logs.getBytes(StandardCharsets.UTF_8),
StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE, StandardOpenOption.SYNC
);
stream.close();
} catch (Exception e) {
log.error("Can't collect logs from container: {}", appParams().getName(), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.corfudb.universe.api.universe.node.NodeException;

import javax.net.ServerSocketFactory;
import javax.net.ssl.SSLServerSocketFactory;
import java.io.IOException;
import java.net.ServerSocket;

Expand All @@ -18,8 +19,11 @@ private ServerUtil() {
* @return random tcp port
*/
public static int getRandomOpenPort() {
try (ServerSocket socket = ServerSocketFactory.getDefault().createServerSocket(0)) {
return socket.getLocalPort();
try {
ServerSocket socket = SSLServerSocketFactory.getDefault().createServerSocket(0);
int localPort = socket.getLocalPort();
socket.close();
return localPort;
} catch (IOException e) {
throw new NodeException("Can't get any open port", e);
}
Expand Down

0 comments on commit ce3989c

Please sign in to comment.