Skip to content

Commit

Permalink
Merge pull request #458 from iExecBlockchainComputing/release/8.5.0
Browse files Browse the repository at this point in the history
Release/8.5.0
  • Loading branch information
jbern0rd authored Jun 17, 2024
2 parents 1d99485 + 843ce1a commit b56e85f
Show file tree
Hide file tree
Showing 22 changed files with 278 additions and 623 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,35 @@

All notable changes to this project will be documented in this file.

## [[8.5.0]](https://github.com/iExecBlockchainComputing/iexec-common/releases/tag/v8.5.0) 2024-06-17

### New Features

- Add `ConfigServerClient` feign client to fetch configuration remotely. (#446)
- Add `ConfigServerClientBuilder` helper class to create feign client instances. (#447)
- Rename `blockchainAdapterUrl` to `configServerUrl` in `PublicConfiguration` class. (#451)
- Add `PRE_COMPUTE_MISSING_ENCLAVE_CONFIGURATION` and `POST_COMPUTE_MALFORMED_ENCRYPTION_PUBLIC_KEY` statuses to `ReplicateStatusCause`. (#453)

### Bug Fixes

- Catch all exceptions in `CipherHelper`. (#455)

### Quality

- Configure Gradle JVM Test Suite Plugin. (#448)
- Remove `ReplicateActionResponse` and `ReplicateTaskSummary` classes. (#452)
- Remove `DateTimeUtils`, `EthAddress` and `VersionUtils` classes. (#454)
- Remove `CredentialsAbstractService` class. (#456)

### Dependency Upgrades

- Upgrade to Gradle 8.7. (#449)
- Upgrade to Spring Boot 2.7.18. (#450)
- Upgrade to `iexec-commons-poco` 4.1.0. (#457)

## [[8.4.0]](https://github.com/iExecBlockchainComputing/iexec-common/releases/tag/v8.4.0) 2024-02-27

### New Feature
### New Features

- Add `enclaveSignature` field to `ResultModel`. (#439 #441)
- Add `error-message` field to `ComputedFile`. (#440)
Expand Down
50 changes: 31 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'java-library'
id 'io.freefair.lombok' version '8.2.2'
id 'io.freefair.lombok' version '8.6'
id 'jacoco'
id 'org.sonarqube' version '4.2.1.3168'
id 'org.sonarqube' version '5.0.0.4638'
id 'maven-publish'
}

Expand All @@ -17,11 +17,12 @@ if (!project.hasProperty('gitBranch')) {
ext.gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()
}

if (gitBranch != 'main' && gitBranch != 'master' && ! (gitBranch ==~ '(release|hotfix|support)/.*')) {
if (gitBranch != 'main' && gitBranch != 'master' && !(gitBranch ==~ '(release|hotfix|support)/.*')) {
version += '-NEXT-SNAPSHOT'
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = 'https://docker-regis-adm.iex.ec/repository/maven-public/'
Expand All @@ -35,11 +36,15 @@ repositories {
}
}

//configurations.configureEach {
// resolutionStrategy.failOnVersionConflict()
//}

// java-library plugin defines 'api' configuration
// 'api' configuration allows to expose dependencies with 'compile' scope in pom
// 'implementation' configuration allows to expose dependencies with 'runtime' scope in pom
dependencies {
implementation platform('org.springframework.boot:spring-boot-dependencies:2.7.17')
implementation platform('org.springframework.boot:spring-boot-dependencies:2.7.18')

// feign
api "io.github.openfeign:feign-jackson:$openFeignVersion"
Expand Down Expand Up @@ -74,19 +79,6 @@ dependencies {

// expiring map
implementation 'net.jodah:expiringmap:0.5.10'

// test
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation 'org.mockito:mockito-junit-jupiter'
testImplementation 'org.assertj:assertj-core'
// mock-server
testImplementation "org.mock-server:mockserver-client-java:$mockServerVersion"
testImplementation "org.mock-server:mockserver-junit-jupiter:$mockServerVersion"
// spring-boot-test to capture test outputs
testImplementation 'org.springframework.boot:spring-boot-test'
// spring-test for ReflectionTestUtils
testImplementation 'org.springframework:spring-test'
}

java {
Expand All @@ -99,8 +91,29 @@ java {
withSourcesJar()
}

testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation 'org.junit.jupiter:junit-jupiter'
implementation 'org.mockito:mockito-junit-jupiter'
implementation 'org.assertj:assertj-core'
// mock-server
implementation "org.mock-server:mockserver-client-java:$mockServerVersion"
implementation "org.mock-server:mockserver-junit-jupiter:$mockServerVersion"
// spring-test for ReflectionTestUtils
implementation 'org.springframework:spring-test'
}
}
}
}

tasks.withType(Test).configureEach {
finalizedBy jacocoTestReport
}

test {
useJUnitPlatform()
reports {
junitXml.required = true
html.required = true
Expand All @@ -118,7 +131,6 @@ jacocoTestReport {
xml.required = true
}
}
tasks.test.finalizedBy tasks.jacocoTestReport
tasks.sonarqube.dependsOn tasks.jacocoTestReport

publishing {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=8.4.0
iexecCommonsPocoVersion=3.2.0
version=8.5.0
iexecCommonsPocoVersion=4.1.0

nexusUser
nexusPassword
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ 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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# 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"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
102 changes: 0 additions & 102 deletions src/main/java/com/iexec/common/chain/CredentialsAbstractService.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 IEXEC BLOCKCHAIN TECH
* Copyright 2022-2024 IEXEC BLOCKCHAIN TECH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,8 @@

package com.iexec.common.chain.validation;

import com.iexec.common.utils.EthAddress;
import com.iexec.commons.poco.utils.BytesUtils;
import com.iexec.commons.poco.utils.EthAddress;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 IEXEC BLOCKCHAIN TECH
* Copyright 2024-2024 IEXEC BLOCKCHAIN TECH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,16 +14,11 @@
* limitations under the License.
*/

package com.iexec.common.utils;
package com.iexec.common.config;

public class VersionUtils {

private VersionUtils() {
throw new UnsupportedOperationException();
}

public static boolean isSnapshot(String version) {
return version.contains("NEXT");
}
import feign.RequestLine;

public interface ConfigServerClient {
@RequestLine("GET /config/chain")
PublicChainConfig getPublicChainConfig();
}
Loading

0 comments on commit b56e85f

Please sign in to comment.