Skip to content

Commit 5168d75

Browse files
authored
Merge pull request #554 from iExecBlockchainComputing/release/8.2.0
Release/8.2.0
2 parents dde2c00 + f1697a3 commit 5168d75

36 files changed

+461
-348
lines changed

CHANGELOG.md

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

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

5+
## [[8.2.0]](https://github.com/iExecBlockchainComputing/iexec-worker/releases/tag/v8.2.0) 2023-09-29
6+
7+
### New Features
8+
- Check result files name length before zipping. (#538)
9+
### Bug fixes
10+
- Implement thread-safe login on scheduler. (#541)
11+
- Fix and harmonize `Dockerfile entrypoint` in all Spring Boot applications. (#548)
12+
- Remove potential `NullPointerException` and add `isStatusValidOnChainAfterPendingReceipt` in `IexecHubService`. (#550)
13+
### Quality
14+
- Remove `nexus.intra.iex.ec` repository. (#539)
15+
- Remove `Graylog` support. Fetch logs with a sidecar to push them to your log infrastructure. (#540)
16+
- Rename scontain registry to `registry.scontain.com`. (#542)
17+
- Upgrade to Gradle 8.2.1 with up-to-date plugins. (#545)
18+
- Fix log format in `LasService`. (#546)
19+
- Do not retry calls to fetch replicate from a scheduler, those calls are already scheduled. (#547)
20+
- Remove dead code in `IexecHubService`. (#550)
21+
- Remove `VersionService#isSnapshot`. (#552)
22+
### Dependency Upgrades
23+
- Upgrade to `iexec-common` 8.2.1-NEXT-SNAPSHOT. (#538)
24+
- Remove `logstash-gelf` dependency. (#540)
25+
- Upgrade to `eclipse-temurin` 11.0.20. (#543)
26+
- Upgrade to Spring Boot 2.7.14. (#544)
27+
- Upgrade to Spring Dependency Management Plugin 1.1.3. (#544)
28+
- Upgrade to `jenkins-library` 2.7.3. (#549)
29+
- Upgrade to `iexec-commons-poco` 3.1.0. (#551)
30+
- Upgrade to `iexec-common` 8.3.0. (#551)
31+
- Upgrade to `iexec-commons-containers` 1.1.2. (#551 #552)
32+
- Upgrade to `iexec-blockchain-adapter-api-library` 8.2.0. (#553)
33+
- Upgrade to `iexec-result-proxy-library` 8.2.0. (#553)
34+
- Upgrade to `iexec-sms-library` 8.3.0. (#553)
35+
536
## [[8.1.4]](https://github.com/iExecBlockchainComputing/iexec-worker/releases/tag/v8.1.4) 2023-06-27
637

738
### Dependency Upgrades

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-worker.jar
1212

13-
ENTRYPOINT [ "/bin/sh", "-c", "exec java -Djava.security.egd=file:/dev/./urandom -jar iexec-worker.jar" ]
13+
ENTRYPOINT [ "java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "iexec-worker.jar" ]

Jenkinsfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
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,
7-
dockerfileDir: '.',
8-
preDevelopVisibility: 'iex.ec',
9-
developVisibility: 'iex.ec',
10-
preProductionVisibility: 'docker.io',
11-
productionVisibility: 'docker.io')
7+
dockerfileDir: '.')

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ You can configure the _iExec Worker_ with the following properties:
4747
| `IEXEC_WORKER_SCONTAIN_REGISTRY_USERNAME` | Username to connect to the Scontain registry. | String | |
4848
| `IEXEC_WORKER_SCONTAIN_REGISTRY_PASSWORD` | Password to connect to the Scontain registry. | String | |
4949
| `IEXEC_LAS_PORT` | Port the LAS should be started on. | Positive integer | `18766` |
50-
| `IEXEC_CORE_GRAYLOG_HOST` | Graylog server host. | String | `localhost` |
51-
| `IEXEC_CORE_GRAYLOG_PORT` | Graylog server port. | Positive integer | `12201` |
5250
| `IEXEC_WORKER_SGX_DRIVER_MODE` | Intel® SGX driver that should be used. | { NONE, LEGACY, NATIVE } | `NONE` |
5351

5452
## Health checks

build.gradle

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
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.worker'
1212

1313
ext {
14-
springCloudVersion = '2021.0.5'
14+
springCloudVersion = '2021.0.8'
1515
dockerJavaVersion = '3.2.12'
1616
lombokVersion = '1.18.2'
1717
}
@@ -34,22 +34,11 @@ repositories {
3434
password nexusPassword
3535
}
3636
}
37-
maven {
38-
url "https://nexus.intra.iex.ec/repository/maven-public/"
39-
}
4037
maven {
4138
url "https://jitpack.io"
4239
}
4340
}
4441

45-
configurations {
46-
all {
47-
// Exclude JUnit 4. Only JUnit 5 is used
48-
exclude group: 'junit', module: 'junit'
49-
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
50-
}
51-
}
52-
5342
dependencyManagement {
5443
imports {
5544
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
@@ -66,28 +55,18 @@ dependencies {
6655
implementation "com.iexec.sms:iexec-sms-library:$iexecSmsVersion"
6756

6857
// spring
69-
implementation("org.springframework.boot:spring-boot-starter") {
70-
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' //required for Graylog
71-
}
58+
implementation "org.springframework.boot:spring-boot-starter"
7259
implementation "org.springframework.boot:spring-boot-starter-actuator"
7360
implementation 'org.springframework.boot:spring-boot-starter-validation'
7461
implementation "org.springframework.boot:spring-boot-starter-web"
7562
implementation "org.springframework.boot:spring-boot-starter-websocket"
7663
implementation "org.springframework.cloud:spring-cloud-starter"
7764
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
7865
implementation "org.springframework.retry:spring-retry"
79-
testImplementation "org.springframework.boot:spring-boot-starter-test"
80-
testImplementation "org.mockito:mockito-inline:4.8.0" // activates mocking final classes/methods
8166

8267
// apache commons.lang3
8368
implementation 'org.apache.commons:commons-lang3'
8469

85-
// Web3j issues, see core build.gradle
86-
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
87-
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
88-
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
89-
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
90-
9170
// Required for com.iexec.worker.feign.config.RestTemplateConfig
9271
implementation 'org.apache.httpcomponents:httpclient'
9372

@@ -98,9 +77,6 @@ dependencies {
9877
// Removes 'warning: unknown enum constant When.MAYBE'
9978
implementation 'com.google.code.findbugs:annotations:3.0.1'
10079

101-
//graylog
102-
implementation 'biz.paluch.logging:logstash-gelf:1.5.1'
103-
10480
// observability
10581
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
10682

@@ -110,6 +86,11 @@ dependencies {
11086
// expiring map
11187
implementation 'net.jodah:expiringmap:0.5.10'
11288

89+
// tests
90+
testImplementation "org.springframework.boot:spring-boot-starter-test"
91+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
92+
testImplementation "org.mockito:mockito-inline" // activates mocking final classes/methods
93+
11394
// awaitility
11495
testImplementation "org.awaitility:awaitility"
11596
}
@@ -120,14 +101,6 @@ java {
120101
}
121102
}
122103

123-
// ./gradlew build -Pdev
124-
def isDev = project.hasProperty('dev')
125-
126-
jar {
127-
enabled true
128-
archiveClassifier.set('library')
129-
}
130-
131104
springBoot {
132105
buildInfo()
133106
}
@@ -140,22 +113,14 @@ tasks.named("bootJar") {
140113
}
141114

142115
test {
143-
useJUnitPlatform {
144-
// Ignore slow tests in development
145-
if (isDev) {
146-
excludeTags 'slow'
147-
}
148-
}
116+
useJUnitPlatform()
149117
}
150118

151-
task itest {
119+
tasks.register('itest') {
152120
group 'Verification'
153121
description 'Runs the integration tests.'
154122
}
155123

156-
jacoco {
157-
toolVersion = "0.8.7"
158-
}
159124
// sonarqube code coverage requires jacoco XML report
160125
jacocoTestReport {
161126
reports {
@@ -187,7 +152,7 @@ ext.jarPathForOCI = relativePath(tasks.bootJar.outputs.files.singleFile)
187152
ext.gitShortCommit = 'git rev-parse --short=8 HEAD'.execute().text.trim()
188153
ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remote.origin.url) .git'].execute().text.trim()
189154

190-
task buildImage(type: Exec) {
155+
tasks.register('buildImage', Exec) {
191156
group 'Build'
192157
description 'Builds an OCI image from a Dockerfile.'
193158
dependsOn bootJar

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version=8.1.4
2-
iexecCommonVersion=8.2.1
3-
iexecCommonsContainersVersion=1.0.3
4-
iexecCommonsPocoVersion=3.0.5
5-
iexecBlockchainAdapterVersion=8.1.1
6-
iexecResultVersion=8.1.1
7-
iexecSmsVersion=8.1.1
1+
version=8.2.0
2+
iexecCommonVersion=8.3.0
3+
iexecCommonsContainersVersion=1.1.2
4+
iexecCommonsPocoVersion=3.1.0
5+
iexecBlockchainAdapterVersion=8.2.0
6+
iexecResultVersion=8.2.0
7+
iexecSmsVersion=8.3.0
88

99
nexusUser
1010
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

src/main/java/com/iexec/worker/PingService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -80,10 +80,10 @@ void pingScheduler() {
8080
try {
8181
sessionId = coreClient.ping(loginService.getToken());
8282
} catch (FeignException e) {
83+
log.warn("The worker cannot ping the core [status:{}]", e.status());
8384
if (e instanceof FeignException.Unauthorized) {
8485
loginService.login();
8586
}
86-
log.warn("The worker cannot ping the core [status:{}]", e.status());
8787
return;
8888
}
8989

0 commit comments

Comments
 (0)