Skip to content

Commit 417ccab

Browse files
authored
Merge pull request #621 from iExecBlockchainComputing/release/8.2.0
Release/8.2.0
2 parents d10faf0 + dc2bb28 commit 417ccab

File tree

52 files changed

+1042
-328
lines changed

Some content is hidden

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

52 files changed

+1042
-328
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

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

5+
## [[8.2.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.2.0) 2023-09-29
6+
7+
### New Features
8+
- Add blockchain connection health indicator. (#601)
9+
- Block some connections and messages when blockchain connection is down. (#604)
10+
- Block deal watching mechanisms when communication with the blockchain node is lost. (#606)
11+
- Use `isEligibleToContributeAndFinalize` method from `TaskDescription`. (#619)
12+
### Bug Fixes
13+
- Clean call to `iexecHubService#getTaskDescriptionFromChain` in test. (#597)
14+
- Reject deal if TEE tag but trust not in {0,1}. (#598)
15+
- Fix and harmonize `Dockerfile entrypoint` in all Spring Boot applications. (#614)
16+
- Use `mongo:4.4` in tests with `MongoDBContainer`. Replace `getContainerIpAddress` with `getHost`. (#616)
17+
### Quality
18+
- Remove `nexus.intra.iex.ec` repository. (#605)
19+
- Remove `Graylog` support. Fetch logs with a sidecar to push them to your log infrastructure. (#607)
20+
- Events are now immutable with `@Value` lombok annotation. (#608)
21+
- Fix several code smells. (#609)
22+
- Upgrade to Gradle 8.2.1 with up-to-date plugins. (#612)
23+
- Remove `VersionService#isSnapshot`. (#618)
24+
### Dependency Upgrades
25+
- Remove `logstash-gelf` dependency. (#607)
26+
- Upgrade to `eclipse-temurin` 11.0.20. (#610)
27+
- Upgrade to Spring Boot 2.7.14. (#611)
28+
- Upgrade to Spring Dependency Management Plugin 1.1.3. (#611)
29+
- Upgrade to `testcontainers` 1.19.0. (#613)
30+
- Upgrade to `jenkins-library` 2.7.3. (#615)
31+
- Upgrade to `iexec-commons-poco` 3.1.0. (#617)
32+
- Upgrade to `iexec-common` 8.3.0. (#617)
33+
- Upgrade to `iexec-blockchain-adapter-api-library` 8.2.0. (#620)
34+
- Upgrade to `iexec-result-proxy-library` 8.2.0. (#620)
35+
- Upgrade to `iexec-sms-library` 8.3.0. (#620)
36+
537
## [[8.1.2]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.1.2) 2023-06-29
638

739
## Bug fixes

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:11.0.18_10-jre
1+
FROM eclipse-temurin:11.0.20_8-jre-focal
22

33
ARG jar
44

@@ -10,4 +10,4 @@ RUN apt-get update \
1010

1111
COPY $jar iexec-core.jar
1212

13-
ENTRYPOINT ["java", "-jar", "/iexec-core.jar"]
13+
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/iexec-core.jar"]

Jenkinsfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
@Library('global-jenkins-library@2.4.0') _
1+
@Library('global-jenkins-library@2.7.3') _
22
buildJavaProject(
33
buildInfo: getBuildInfo(),
44
integrationTestsEnvVars: [],
55
shouldPublishJars: true,
66
shouldPublishDockerImages: true,
77
dockerfileDir: '.',
8-
buildContext: '.',
9-
preDevelopVisibility: 'iex.ec',
10-
developVisibility: 'iex.ec',
11-
preProductionVisibility: 'docker.io',
12-
productionVisibility: 'docker.io')
8+
buildContext: '.')

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You can configure the _iExec Core Scheduler_ with the following properties:
2424
| `IEXEC_CORE_PORT` | Server port of the _iExec Core Scheduler_. | Positive integer | `13000` |
2525
| `MONGO_HOST` | _MongoDB_ server host. Cannot be set with URI. | String | `localhost` |
2626
| `MONGO_PORT` | _MongoDB_ server port. Cannot be set with URI. | Positive integer | `13002` |
27-
| `IEXEC_PLATFORM_REGISTRY` | _iExec Platform Registry_ server URL. | URL | |
27+
| `IEXEC_PLATFORM_REGISTRY` | _iExec Platform Registry_ server URL. | URL | `http://localhost:8888` |
2828
| `IEXEC_PLATFORM_REGISTRY_STACK` | [optional] Use a specific stack configuration exposed by the _iExec Platform Registry_. | String | |
2929
| `IEXEC_PLATFORM_REGISTRY_LABEL` | [optional] Use a labeled version of configuration files exposed by the _iExec Platform Registry_. It might be a Git label such as `main`, `v10` or `07998be`. | String | |
3030
| `REVEAL_TIMEOUT_PERIOD` | Detector period to track reveal timeouts for tasks. | Positive integer | `120000` |
@@ -39,16 +39,16 @@ You can configure the _iExec Core Scheduler_ with the following properties:
3939
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
4040
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap` | Integer | `22000000000` |
4141
| `IEXEC_CORE_CHAIN_ADAPTER_PROTOCOL` | _iExec Blockchain Adapter_ communication protocol. | String | `http` |
42-
| `IEXEC_CORE_CHAIN_ADAPTER_HOST` | _iExec Blockchain Adapter_ server host. | String | `blockchain-adapter` |
42+
| `IEXEC_CORE_CHAIN_ADAPTER_HOST` | _iExec Blockchain Adapter_ server host. | String | `localhost` |
4343
| `IEXEC_CORE_CHAIN_ADAPTER_PORT` | _iExec Blockchain Adapter_ server port. | Positive integer | `13010` |
4444
| `IEXEC_CORE_CHAIN_ADAPTER_USERNAME` | Username to connect to the _iExec Blockchain Adapter_ server. | String | `admin` |
4545
| `IEXEC_CORE_CHAIN_ADAPTER_PASSWORD` | Password to connect to the _iExec Blockchain Adapter_ server. | String | `whatever` |
46+
| `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 |
47+
| `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 |
4648
| `IEXEC_RESULT_REPOSITORY_PROTOCOL` | _iExec Result Proxy_ server communication protocol. | String | `http` |
4749
| `IEXEC_RESULT_REPOSITORY_HOST` | _iExec Result Proxy_ server host. | String | `localhost` |
4850
| `IEXEC_RESULT_REPOSITORY_PORT` | _iExec Result Proxy_ server port. | Positive integer | `13200` |
4951
| `IEXEC_CORE_MANAGEMENT_ACTUATORS` | Endpoint IDs that should be included or `*` for all. | String | `health, info` |
50-
| `IEXEC_CORE_GRAYLOG_HOST` | _Graylog_ server host. | String | `localhost` |
51-
| `IEXEC_CORE_GRAYLOG_PORT` | _Graylog_ server port. | Positive integer | `12201` |
5252
| `IEXEC_LOGS_PURGE_RATE_IN_DAYS` | Interval in days between 2 executions of the purge mechanism. | Positive integer | `1` |
5353
| `IEXEC_LOGS_AVAILABILITY_PERIOD_IN_DAYS` | Number of days to keep logs of past tasks. | Positive integer | `3` |
5454

build.gradle

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
plugins {
22
id 'java'
3-
id 'io.freefair.lombok' version '6.6.1'
4-
id 'org.springframework.boot' version '2.6.14'
5-
id 'io.spring.dependency-management' version '1.1.0'
3+
id 'io.freefair.lombok' version '8.2.2'
4+
id 'org.springframework.boot' version '2.7.14'
5+
id 'io.spring.dependency-management' version '1.1.3'
66
id 'jacoco'
7-
id 'org.sonarqube' version '3.3'
7+
id 'org.sonarqube' version '4.2.1.3168'
88
id 'maven-publish'
99
}
1010

1111
group = 'com.iexec.core'
1212

1313
ext {
14-
springCloudVersion = '2021.0.5'
14+
springCloudVersion = '2021.0.8'
1515
jjwtVersion = '0.11.5'
1616
mongockVersion = '4.2.7.BETA'
17+
testContainersVersion = '1.19.0'
1718
}
1819

1920
if (!project.hasProperty('gitBranch')) {
@@ -34,9 +35,6 @@ repositories {
3435
password nexusPassword
3536
}
3637
}
37-
maven {
38-
url "https://nexus.intra.iex.ec/repository/maven-public/"
39-
}
4038
maven { url "https://jitpack.io" }
4139
}
4240

@@ -55,9 +53,7 @@ dependencies {
5553
implementation "com.iexec.sms:iexec-sms-library:$iexecSmsVersion"
5654

5755
// spring
58-
implementation ("org.springframework.boot:spring-boot-starter") {
59-
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' //required for Graylog
60-
}
56+
implementation "org.springframework.boot:spring-boot-starter"
6157
implementation "org.springframework.boot:spring-boot-starter-actuator"
6258
implementation "org.springframework.boot:spring-boot-starter-aop"
6359
implementation "org.springframework.boot:spring-boot-starter-data-mongodb"
@@ -69,18 +65,13 @@ dependencies {
6965
implementation 'org.springframework.cloud:spring-cloud-starter-config'
7066
implementation "org.springframework.retry:spring-retry"
7167

72-
// apache commons.lang3
73-
implementation 'org.apache.commons:commons-lang3'
74-
75-
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
76-
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
77-
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
78-
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
79-
8068
// Spring Doc
8169
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
8270

83-
// jason web token
71+
// apache commons.lang3
72+
implementation 'org.apache.commons:commons-lang3'
73+
74+
// json web token
8475
implementation "io.jsonwebtoken:jjwt-api:$jjwtVersion"
8576
runtimeOnly "io.jsonwebtoken:jjwt-impl:$jjwtVersion"
8677
runtimeOnly "io.jsonwebtoken:jjwt-jackson:$jjwtVersion"
@@ -91,9 +82,6 @@ dependencies {
9182
// ipfs
9283
implementation "com.github.ipfs:java-ipfs-http-client:1.2.3"
9384

94-
// graylog
95-
implementation 'biz.paluch.logging:logstash-gelf:1.5.1'
96-
9785
// observability
9886
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
9987

@@ -104,15 +92,16 @@ dependencies {
10492
// vavr
10593
implementation 'io.vavr:vavr:0.10.4'
10694

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

10999
// awaitility
110100
testImplementation 'org.awaitility:awaitility'
111101

112102
// mongo
113-
testImplementation 'org.testcontainers:testcontainers:1.16.2'
114-
testImplementation 'org.testcontainers:junit-jupiter:1.16.2'
115-
testImplementation 'org.testcontainers:mongodb:1.16.2'
103+
testImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
104+
testImplementation "org.testcontainers:mongodb:$testContainersVersion"
116105
}
117106

118107
java {
@@ -141,14 +130,11 @@ test {
141130
useJUnitPlatform()
142131
}
143132

144-
task itest {
133+
tasks.register('itest') {
145134
group 'Verification'
146135
description 'Runs the integration tests.'
147136
}
148137

149-
jacoco {
150-
toolVersion = "0.8.7"
151-
}
152138
// sonarqube code coverage requires jacoco XML report
153139
jacocoTestReport {
154140
reports {
@@ -180,7 +166,7 @@ ext.jarPathForOCI = relativePath(tasks.bootJar.outputs.files.singleFile)
180166
ext.gitShortCommit = 'git rev-parse --short=8 HEAD'.execute().text.trim()
181167
ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remote.origin.url) .git'].execute().text.trim()
182168

183-
task buildImage(type: Exec) {
169+
tasks.register('buildImage', Exec) {
184170
group 'Build'
185171
description 'Builds an OCI image from a Dockerfile.'
186172
dependsOn bootJar

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version=8.1.2
2-
iexecCommonVersion=8.2.1
3-
iexecCommonsPocoVersion=3.0.5
4-
iexecBlockchainAdapterVersion=8.1.1
5-
iexecResultVersion=8.1.1
6-
iexecSmsVersion=8.1.1
1+
version=8.2.0
2+
iexecCommonVersion=8.3.0
3+
iexecCommonsPocoVersion=3.1.0
4+
iexecBlockchainAdapterVersion=8.2.0
5+
iexecResultVersion=8.2.0
6+
iexecSmsVersion=8.3.0
77

88
nexusUser
99
nexusPassword

gradle/wrapper/gradle-wrapper.jar

1.76 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,26 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

0 commit comments

Comments
 (0)