Skip to content

Commit 5af1c74

Browse files
authored
Merge pull request #104 from iExecBlockchainComputing/release/8.2.0
Release/8.2.0
2 parents dbb3c26 + 1b91cbc commit 5af1c74

File tree

15 files changed

+313
-82
lines changed

15 files changed

+313
-82
lines changed

CHANGELOG.md

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

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

5+
## [[8.2.0]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.2.0) 2023-09-28
6+
7+
### New Features
8+
- Remove `nexus.intra.iex.ec` repository. (#94)
9+
- Check result hash before uploading. (#101)
10+
### Bug Fixes
11+
- Fix and harmonize `Dockerfile entrypoint` in all Spring Boot applications. (#98)
12+
- Describe upload limits configuration in README.md. (#99)
13+
### Quality
14+
- Upgrade to Gradle 8.2.1 with up-to-date plugins. (#97)
15+
- Remove `VersionService#isSnapshot`. (#103)
16+
### Dependency Upgrades
17+
- Upgrade to `eclipse-temurin` 11.0.20. (#95)
18+
- Upgrade to Spring Boot 2.7.14. (#96)
19+
- Upgrade to Spring Dependency Management Plugin 1.1.3. (#96)
20+
- Upgrade to `jenkins-library` 2.7.3. (#100)
21+
- Upgrade to `iexec-common` 8.3.0. (#102)
22+
- Upgrade to `iexec-common-poco` 3.1.0. (#102)
23+
524
## [[8.1.1]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.1.1) 2023-06-23
625

726
### 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

@@ -12,4 +12,4 @@ COPY $jar iexec-result-proxy.jar
1212

1313
# For Spring-Boot project, use the entrypoint
1414
# below to reduce Tomcat startup time.
15-
ENTRYPOINT exec java -Djava.security.egd=file:/dev/./urandom -jar iexec-result-proxy.jar
15+
ENTRYPOINT [ "java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "iexec-result-proxy.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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ To run properly, the iExec Result Proxy requires:
1515

1616
You can configure the iExec Result Proxy with the following properties:
1717

18+
### Main application properties
19+
1820
| Environment variable | Description | Type | Default value |
1921
| --- | --- | --- | --- |
2022
| `IEXEC_RESULT_PROXY_PORT` | Server HTTP port of the result proxy. | Positive integer | `13200` |
@@ -30,6 +32,17 @@ You can configure the iExec Result Proxy with the following properties:
3032
| `IEXEC_IPFS_HOST` | Host to connect to the IPFS node. | String | `127.0.0.1` |
3133
| `IEXEC_IPFS_PORT` | Server port of the IPFS node. | Positive integer | `5001` |
3234

35+
### Spring web application properties
36+
37+
In addition to the aforementioned properties, it is possible to leverage [Spring Common Application Properties](https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html).
38+
More specifically, you may want to configure limits of uploadable file sizes.
39+
In order to do so, you can override the default for the following [Web Properties](https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties.web).
40+
41+
| Environment variable | Description | Type | Default value |
42+
| --- | --- | --- | --- |
43+
| `SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE` | Max file size. | String | `1MB` |
44+
| `SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE` | Max request size. | String | `10MB` |
45+
3346
## Health checks
3447

3548
A health endpoint (`/actuator/health`) is enabled by default and can be accessed on the **IEXEC_RESULT_PROXY_PORT**.

build.gradle

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
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
ext {
12-
springCloudVersion = '2021.0.5'
12+
springCloudVersion = '2021.0.8'
1313
jjwtVersion = '0.11.5'
1414
}
1515

@@ -32,9 +32,6 @@ allprojects {
3232
password nexusPassword
3333
}
3434
}
35-
maven {
36-
url 'https://nexus.intra.iex.ec/repository/maven-public/'
37-
}
3835
maven {
3936
url 'https://jitpack.io'
4037
}
@@ -51,12 +48,6 @@ dependencies {
5148
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
5249
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
5350

54-
// Web3j issues, see core build.gradle
55-
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
56-
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
57-
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
58-
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
59-
6051
// spring
6152
implementation 'org.springframework.boot:spring-boot-starter-actuator'
6253
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
@@ -67,13 +58,6 @@ dependencies {
6758
// observability
6859
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
6960

70-
// test
71-
testImplementation('org.springframework.boot:spring-boot-starter-test') {
72-
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
73-
}
74-
testImplementation 'org.springframework.security:spring-security-test'
75-
testImplementation 'org.mockito:mockito-inline:2.13.0' // activates mocking final classes/methods
76-
7761
// Spring Doc
7862
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
7963

@@ -87,6 +71,10 @@ dependencies {
8771

8872
// expiring map
8973
implementation 'net.jodah:expiringmap:0.5.10'
74+
75+
// test
76+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
77+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
9078
}
9179

9280
dependencyManagement {
@@ -110,16 +98,11 @@ test {
11098
useJUnitPlatform()
11199
}
112100

113-
task itest {
101+
tasks.register('itest') {
114102
group 'Verification'
115103
description 'Runs the integration tests.'
116104
}
117105

118-
// the test coverage report is
119-
// created just before the build
120-
jacoco {
121-
toolVersion = "0.8.7"
122-
}
123106
// sonarqube code coverage requires jacoco XML report
124107
jacocoTestReport {
125108
reports {
@@ -151,7 +134,7 @@ ext.jarPathForOCI = relativePath(tasks.bootJar.outputs.files.singleFile)
151134
ext.gitShortCommit = 'git rev-parse --short=8 HEAD'.execute().text.trim()
152135
ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remote.origin.url) .git'].execute().text.trim()
153136

154-
task buildImage(type: Exec) {
137+
tasks.register('buildImage', Exec) {
155138
group 'Build'
156139
description 'Builds an OCI image from a Dockerfile.'
157140
dependsOn tasks.bootJar

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version=8.1.1
2-
iexecCommonVersion=8.2.1
3-
iexecCommonsPocoVersion=3.0.4
1+
version=8.2.0
2+
iexecCommonVersion=8.3.0
3+
iexecCommonsPocoVersion=3.1.0
44

55
nexusUser
66
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

iexec-result-proxy-library/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies {
99
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1010
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1111
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
12+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
1213
}
1314

1415
java {
@@ -20,9 +21,6 @@ test {
2021
useJUnitPlatform()
2122
}
2223

23-
jacoco {
24-
toolVersion = "0.8.7"
25-
}
2624
// sonarqube code coverage requires jacoco XML report
2725
jacocoTestReport {
2826
reports {

0 commit comments

Comments
 (0)