Skip to content

Commit

Permalink
Merge pull request #710 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 19, 2024
2 parents 2935a0c + cc6bdb0 commit a3234eb
Show file tree
Hide file tree
Showing 75 changed files with 1,490 additions and 798 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

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

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

### Deprecation Notices

- Deprecate legacy task feedback API endpoints. (#701)

### New Features

- Create `iexec-task-api` to access task feedback API. (#695)
- Move `notification` package from `iexec-commons-poco` to `iexec-core-library`. (#697 #698)
- Move `PublicConfiguration` class from `iexec-common` to `iexec-core-library`. (#699)
- Create `ConfigServerClient` instance and use it. (#700)
- Allow up to 32 task updates at a given time. (#703)
- Index `currentStatus` field in `task` collection. (#707)
- Replace `CredentialsService` with `SignerService`. (#708)

### Bug Fixes

- Always use `WorkerpoolAuthorization` to retrieve JWT and check result upload on Result Proxy. (#690)
- Use correct `Signature` import in `SchedulerClient`. (#697)
- Do not supply replicates past their contribution deadline to workers. (#702)
- Query blockchain adapter every 2s instead of every second. (#706)

### Quality

- Configure Gradle JVM Test Suite Plugin. (#691)
- Rename `IexecTaskApiClient` to `TaskApiClient`. (#696)
- Move `ReplicateTaskSummary` from `iexec-common` to `iexec-core`. (#704 #705)

### Dependency Upgrades

- Upgrade to Gradle 8.7. (#692)
- Upgrade to `eclipse-temurin:11.0.22_7-jre-focal`. (#693)
- Upgrade to Spring Boot 2.7.18. (#694)
- Upgrade to `iexec-commons-poco` 4.1.0. (#709)
- Upgrade to `iexec-common` 8.5.0. (#709)
- Upgrade to `iexec-blockchain-adapter-api-library` 8.5.0. (#709)
- Upgrade to `iexec-result-proxy-library` 8.5.0. (#709)
- Upgrade to `iexec-sms-library` 8.6.0. (#709)

## [[8.4.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.4.1) 2024-04-03

### New Features
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:11.0.21_9-jre-focal
FROM eclipse-temurin:11.0.22_7-jre-focal

ARG jar

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ To run properly, the _iExec Core Scheduler_ requires:
* An _iExec Blockchain Adapter_ for several blockchain network interactions.
* An _iExec Result Proxy_ to check if tasks results have been published.
* An _iExec Platform Registry_ to retrieve locations of _iExec SMS_ services.
* An _iExec Config Server_ to retrieve configuration about blockchain.
* One or many _iExec Secret Management Service_ instances (referenced by the _iExec Platform Registry_) to handle secrets and enclave sessions of TEE tasks.

You can configure the _iExec Core Scheduler_ with the following properties:
Expand Down Expand Up @@ -43,6 +44,9 @@ You can configure the _iExec Core Scheduler_ with the following properties:
| `IEXEC_CORE_CHAIN_ADAPTER_PORT` | _iExec Blockchain Adapter_ server port. | Positive integer | `13010` |
| `IEXEC_CORE_CHAIN_ADAPTER_USERNAME` | Username to connect to the _iExec Blockchain Adapter_ server. | String | `admin` |
| `IEXEC_CORE_CHAIN_ADAPTER_PASSWORD` | Password to connect to the _iExec Blockchain Adapter_ server. | String | `whatever` |
| `IEXEC_CONFIG_SERVER_PROTOCOL` | _iExec Config Server_ communication protocol. | String | `http` |
| `IEXEC_CONFIG_SERVER_HOST` | _iExec Config Server_ host. | String | `localhost` |
| `IEXEC_CONFIG_SERVER_PORT` | _iExec Config Server_ port. | Positive integer | `8888` |
| `IEXEC_CHAIN_HEALTH_POLLING_INTERVAL_IN_BLOCKS` | Polling interval (in blocks) on the blockchain to check this _Scheduler_ can communicate with it. | Positive integer | 3 |
| `IEXEC_CHAIN_HEALTH_OUT_OF_SERVICE_THRESHOLD` | Max number of consecutive failures of blockchain connection attempts before this _Scheduler_ is declared as OUT-OF-SERVICE. | Positive integer | 4 |
| `IEXEC_RESULT_REPOSITORY_PROTOCOL` | _iExec Result Proxy_ server communication protocol. | String | `http` |
Expand Down
46 changes: 24 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'java'
id 'io.freefair.lombok' version '8.2.2'
id 'org.springframework.boot' version '2.7.17'
id 'io.freefair.lombok' version '8.6'
id 'org.springframework.boot' version '2.7.18'
id 'io.spring.dependency-management' version '1.1.4'
id 'jacoco'
id 'org.sonarqube' version '4.2.1.3168'
id 'org.sonarqube' version '5.0.0.4638'
id 'maven-publish'
}

Expand Down Expand Up @@ -59,6 +59,7 @@ dependencies {
implementation "com.iexec.result-proxy:iexec-result-proxy-library:$iexecResultVersion"
implementation "com.iexec.sms:iexec-sms-library:$iexecSmsVersion"
implementation project(':iexec-core-library')
implementation project(':iexec-task-api')

// spring
implementation "org.springframework.boot:spring-boot-starter"
Expand Down Expand Up @@ -99,22 +100,6 @@ dependencies {

// vavr
implementation 'io.vavr:vavr:0.10.4'

// tests
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

// awaitility
testImplementation 'org.awaitility:awaitility'

// mongo
testImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
testImplementation "org.testcontainers:mongodb:$testContainersVersion"
}

jar {
enabled = true
archiveClassifier.set('library')
}

springBoot {
Expand All @@ -128,8 +113,26 @@ tasks.named("bootJar") {
}
}

test {
useJUnitPlatform()
testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-test'

// awaitility
implementation 'org.awaitility:awaitility'

// mongo
implementation "org.testcontainers:junit-jupiter:$testContainersVersion"
implementation "org.testcontainers:mongodb:$testContainersVersion"
}
}
}
}

tasks.withType(Test).configureEach {
finalizedBy jacocoTestReport
systemProperty "mongo.image", "mongo:4.4.28-focal"
}

Expand All @@ -144,7 +147,6 @@ jacocoTestReport {
xml.required = true
}
}
tasks.test.finalizedBy tasks.jacocoTestReport
tasks.sonarqube.dependsOn tasks.jacocoTestReport

publishing {
Expand Down
13 changes: 6 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
version=8.4.1
iexecCommonVersion=8.4.0
iexecCommonsPocoVersion=3.2.0
iexecBlockchainAdapterVersion=8.4.0
iexecResultVersion=8.4.0
iexecSmsVersion=8.5.1

version=8.5.0
iexecCommonVersion=8.5.0
iexecCommonsPocoVersion=4.1.0
iexecBlockchainAdapterVersion=8.5.0
iexecResultVersion=8.5.0
iexecSmsVersion=8.6.0
nexusUser
nexusPassword
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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
18 changes: 14 additions & 4 deletions iexec-core-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {
dependencies {
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// TODO remove this later when migration has been done
implementation project(':iexec-task-api')
}

java {
Expand All @@ -19,10 +19,20 @@ java {
withSourcesJar()
}

testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation 'org.junit.jupiter:junit-jupiter:5.8.2'
implementation 'org.assertj:assertj-core:3.22.0'
}
}
}
}

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

// sonarqube code coverage requires jacoco XML report
Expand All @@ -44,7 +54,7 @@ publishing {
username nexusUser
password nexusPassword
}
url = project.hasProperty("nexusUrl")? project.nexusUrl: ''
url = project.hasProperty("nexusUrl") ? project.nexusUrl : ''
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2023 IEXEC BLOCKCHAIN TECH
* Copyright 2023-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,25 +16,29 @@

package com.iexec.core.api;

import com.iexec.common.config.PublicConfiguration;
import com.iexec.common.config.WorkerModel;
import com.iexec.common.replicate.ComputeLogs;
import com.iexec.common.replicate.ReplicateStatusUpdate;
import com.iexec.common.replicate.ReplicateTaskSummary;
import com.iexec.commons.poco.eip712.entity.EIP712Challenge;
import com.iexec.commons.poco.notification.TaskNotification;
import com.iexec.commons.poco.notification.TaskNotificationType;
import com.iexec.commons.poco.security.Signature;
import com.iexec.core.config.PublicConfiguration;
import com.iexec.core.logs.TaskLogsModel;
import com.iexec.core.metric.PlatformMetric;
import com.iexec.core.notification.TaskNotification;
import com.iexec.core.notification.TaskNotificationType;
import com.iexec.core.replicate.ReplicateTaskSummary;
import com.iexec.core.task.TaskModel;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

import java.security.Signature;
import java.util.List;

public interface SchedulerClient {
/**
* @deprecated Use iexec-task-feedback-api
*/
@Deprecated(forRemoval = true)
@RequestLine("GET /metrics")
PlatformMetric getMetrics();

Expand All @@ -54,7 +58,7 @@ public interface SchedulerClient {

@RequestLine("POST /workers/register")
@Headers("Authorization: {authorization}")
void registerWorker(@Param("authorization") String authorization, WorkerModel model);
Void registerWorker(@Param("authorization") String authorization, WorkerModel model);

@RequestLine("GET /workers/config")
PublicConfiguration getPublicConfiguration();
Expand Down Expand Up @@ -85,18 +89,35 @@ TaskNotificationType updateReplicateStatus(
// endregion

// region /tasks

/**
* @deprecated Use iexec-task-feedback-api
*/
@Deprecated(forRemoval = true)
@RequestLine("GET /tasks/{chainTaskId}")
TaskModel getTask(@Param("chainTaskId") String chainTaskId);

/**
* @deprecated Use iexec-task-feedback-api
*/
@Deprecated(forRemoval = true)
@RequestLine("GET /tasks/logs/challenge?address={address}")
EIP712Challenge getTaskLogsChallenge(@Param("address") String address);

/**
* @deprecated Use iexec-task-feedback-api
*/
@Deprecated(forRemoval = true)
@Headers("Authorization: {authorization}")
@RequestLine("GET /tasks/{chainTaskId}/logs")
TaskLogsModel getTaskLogs(
@Param("chainTaskId") String chainTaskId,
@Param("authorization") String authorization);

/**
* @deprecated Use iexec-task-feedback-api
*/
@Deprecated(forRemoval = true)
@Headers("Authorization: {authorization}")
@RequestLine("GET /tasks/{chainTaskId}/replicates/{walletAddress}/logs")
ComputeLogs getComputeLogs(
Expand Down
Loading

0 comments on commit a3234eb

Please sign in to comment.