Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Java 21 #995

Merged
merged 46 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
176b79d
Upgrade to Gradle 8.8
usmansaleem Jun 3, 2024
4b53c40
Upgrade build to use Java 21
usmansaleem Jun 3, 2024
c29a306
Upgrade various plugin versions
usmansaleem Jun 3, 2024
24dea9d
codefix: spotless apply
usmansaleem Jun 3, 2024
0b357d3
jacoco tool version 0.8.8
usmansaleem Jun 3, 2024
41207c0
jacoco tool version 0.8.11
usmansaleem Jun 3, 2024
6d0513d
duplicate license warning fix
usmansaleem Jun 3, 2024
b2fe8d6
disable performance test in circleci
usmansaleem Jun 3, 2024
bb715b6
build: Acceptance test, fix besu and vault downloads
usmansaleem Jun 4, 2024
1a4784a
build: fix vault path for env var
usmansaleem Jun 4, 2024
8fd770c
Merge remote-tracking branch 'upstream/master' into java_21
usmansaleem Jul 17, 2024
6e66fb8
Upgrading to gradle 8.9
usmansaleem Jul 17, 2024
6d395c6
Upgrading azure dependencies. Supressing false positive for dependenc…
usmansaleem Jul 17, 2024
2782578
CircleCI Adding no-op performancetest
usmansaleem Jul 17, 2024
9bbf3e5
Updating spotless plugin and google java format
usmansaleem Jul 17, 2024
45b6bde
Updating spotless section
usmansaleem Jul 17, 2024
cd63ff5
update owasp suppressions
usmansaleem Jul 17, 2024
d5eee1e
Update settings and build gradle files
usmansaleem Jul 17, 2024
df8aeb2
build: jackson-databind 2.17.2
usmansaleem Jul 17, 2024
08eca06
build: various deps updates
usmansaleem Jul 17, 2024
2a8bc86
errorprone: Fix reported issues
usmansaleem Jul 17, 2024
8b00e2a
errorprone: Fix enum ordinal warning in DBLocker
usmansaleem Jul 17, 2024
bdc8f9e
test: Remove deprecated assertion method
usmansaleem Jul 17, 2024
15d5345
supress false positive
usmansaleem Jul 17, 2024
eb14937
Updating log error handler and AT
usmansaleem Jul 17, 2024
3cbd9f2
Update errorprone to latest version
usmansaleem Jul 18, 2024
feb3f1d
Update Teku to 24.6.1
usmansaleem Jul 18, 2024
9fb40b5
Remove gatling plugin and tests
usmansaleem Jul 18, 2024
ab51f96
Remove performance test from circleci
usmansaleem Jul 18, 2024
fe80cfc
cleaning up DBLocker
usmansaleem Jul 18, 2024
600b13f
refactor LogErrorHandler
usmansaleem Jul 18, 2024
482bfed
Updating versions
usmansaleem Jul 19, 2024
98a4ce3
fixing private transaction usage of asRlpValues
usmansaleem Jul 19, 2024
e71f02c
fix import
usmansaleem Jul 19, 2024
fa3bb2b
circleci gradle cache prefix
usmansaleem Jul 19, 2024
ed47edc
spotless fix
usmansaleem Jul 19, 2024
9e18e49
reverting embedded postgres binaries version to 11.22.1 as flyway doe…
usmansaleem Jul 19, 2024
13fc0f2
Add test runtime dependency of flyway postgresql
usmansaleem Jul 19, 2024
a6f2b64
fixing dependency
usmansaleem Jul 19, 2024
6e165df
fix flyway dependency
usmansaleem Jul 19, 2024
5a8bd7f
rest-assured version
usmansaleem Jul 19, 2024
915fccc
fix: Fix metrics tests
usmansaleem Jul 22, 2024
6c5b193
build: Remove spotless gradle source files check
usmansaleem Jul 22, 2024
db5f55b
changelog
usmansaleem Jul 22, 2024
af61c38
review suggestions
usmansaleem Jul 22, 2024
f544317
simplify LogErrorHandler
usmansaleem Jul 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 14 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.1
executors:
executor_med: # 2cpu, 4G ram
docker:
- image: cimg/openjdk:17.0
- image: cimg/openjdk:21.0
auth: &docker-auth
# Don't panic, throw away account to avoid Docker rate limits when downloading.
# Second reason we're doing this is so that forked PRs from external contributors works ie env vars aren't visible to forked PRs from within contexts
Expand All @@ -18,7 +18,7 @@ executors:

executor_large: # 4cpu, 8G ram
docker:
- image: cimg/openjdk:17.0
- image: cimg/openjdk:21.0
auth:
<<: *docker-auth
resource_class: large
Expand All @@ -30,7 +30,7 @@ executors:
executor_large_with_fc_devnet: # 4cpu, 8G ram
docker:
# Primary container
- image: cimg/openjdk:17.0
- image: cimg/openjdk:21.0
auth:
<<: *docker-auth
# Secondary container running lotus as devnet on port 7777
Expand Down Expand Up @@ -82,17 +82,17 @@ commands:
- restore_cache:
name: Restore cached gradle dependencies
keys:
- deps-{{ checksum "build.gradle" }}-{{ .Branch }}-{{ .Revision }}
- deps-{{ checksum "build.gradle" }}
- deps-
machine_java_17:
description: "Install Java 17 on machine executors"
- deps21-{{ checksum "build.gradle" }}-{{ .Branch }}-{{ .Revision }}
- deps21-{{ checksum "build.gradle" }}
- deps21-
machine_java:
description: "Install Java 21 on machine executors"
steps:
- run:
name: Java 17
name: Java 21
command: |
sudo apt update
sudo apt install -q --assume-yes openjdk-17-jre-headless openjdk-17-jdk-headless
sudo apt install -q --assume-yes openjdk-21-jre-headless openjdk-21-jdk-headless
sudo update-java-alternatives -a
capture_test_results:
description: "Capture test results"
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- capture_test_reports
- save_cache:
name: Caching gradle dependencies
key: deps-{{ checksum "build.gradle" }}-{{ .Branch }}-{{ .Revision }}
key: deps21-{{ checksum "build.gradle" }}-{{ .Branch }}-{{ .Revision }}
paths:
- .gradle
- ~/.gradle
Expand Down Expand Up @@ -223,20 +223,6 @@ jobs:
- capture_test_results
- capture_test_reports

performanceTests:
executor: executor_large
steps:
- prepare
- attach_workspace:
at: ~/project
- run:
name: Performance Tests
no_output_timeout: 20m
command: |
./gradlew --no-daemon clean installDist
./gradlew --no-daemon gatlingRun
- capture_test_reports

publish:
executor: executor_med
steps:
Expand All @@ -259,7 +245,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- machine_java
- run:
name: build and test Docker image
command: |
Expand All @@ -272,7 +258,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- machine_java
- docker_trust_sign
- docker_publish_images

Expand All @@ -282,7 +268,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- machine_java
- docker_trust_sign
- docker_publish_images

Expand Down Expand Up @@ -372,12 +358,6 @@ workflows:
<<: *filters-release-tags
context:
- protocols-signers
- performanceTests:
requires:
- build
filters:
tags:
<<: *filters-release-tags
- publishOpenApiSpec:
filters:
branches:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ this release. The Web3Signer docker image will also use Java 21, however, binary
require Java 21 to be available on the host machine.
- This is the last Web3Signer release to use the "filecoin" mode. The "filecoin" mode will be removed in a future release.

### Breaking Changes
- Use Java 21 for build and runtime. Remove Java 17 variant of docker image. zip/tar.gz distributions will require Java 21 or above to run Web3Signer.
- The Web3Signer metrics are now compatible with OpenMetrics data model. This results in the names of counter metrics to append `_total` suffix. Users may need to update their dashboards to reflect these changes.

jframe marked this conversation as resolved.
Show resolved Hide resolved
### Features Added
- Added endpoint `/api/v1/eth2/ext/sign/:identifier` which is enabled using cli option `--Xsigning-ext-enabled=true`.
This endpoint allows signing of additional data not covered by the remoting API specs. [#982](https://github.com/Consensys/web3signer/pull/982)
Expand Down
20 changes: 9 additions & 11 deletions acceptance-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import groovy.text.SimpleTemplateEngine
*/

plugins {
id "de.undercouch.download" version "4.1.0"
id "de.undercouch.download" version "5.6.0"
id "com.google.osdetector" version "1.7.3"
id "io.gatling.gradle" version "3.9.3.1"
}

dependencies {
Expand Down Expand Up @@ -64,6 +63,7 @@ dependencies {
testImplementation 'com.github.arteam:simple-json-rpc-server'
testImplementation 'com.github.arteam:simple-json-rpc-client'
testImplementation 'org.flywaydb:flyway-core'
testImplementation 'org.flywaydb:flyway-database-postgresql'
testImplementation 'io.rest-assured:rest-assured'
testImplementation 'org.jdbi:jdbi3-core'
testImplementation 'org.zeroturnaround:zt-exec'
Expand All @@ -80,8 +80,6 @@ dependencies {
testImplementation 'com.azure:azure-security-keyvault-keys'
testImplementation 'com.azure:azure-security-keyvault-secrets'

gatlingImplementation configurations.getByName("testImplementation")

implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:secretsmanager'
implementation 'software.amazon.awssdk:kms'
Expand All @@ -90,15 +88,15 @@ dependencies {
test.enabled = false

task cleanBesuInstall(type: Delete) {
delete "$buildDir/besu"
delete layout.buildDirectory.dir("besu")
}

task downloadBesu(type: Download) {
src {
// see gradle.properties for Besu URL
return new SimpleTemplateEngine().createTemplate(besuDistroUrl).make(["besuVersion":"$besuVersion"]).toString()
}
dest new File(buildDir, "besu-${besuVersion}.tar.gz")
dest layout.buildDirectory.file("downloads/besu-${besuVersion}.tar.gz")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the downloads directory get created if doesn't exist? And will work on Windows with the hardcoded / directory separator?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on nix without any problems. Need to check our whole build on Windows environment.

onlyIfModified true
retries 3
}
Expand All @@ -114,15 +112,15 @@ task extractBesu(dependsOn: [
}
includeEmptyDirs = false
}
into "$buildDir/besu"
into layout.buildDirectory.dir("besu")
}

def vaultBinary () {
switch (osdetector.os) {
case "windows":
return new File(buildDir, "vault.exe").toString()
return layout.buildDirectory.file("vault-bin/vault.exe").get().toString()
default:
return new File(buildDir, "vault").toString()
return layout.buildDirectory.file("vault-bin/vault").get().toString()
}
}

Expand Down Expand Up @@ -154,13 +152,13 @@ task downloadVault(type: Download) {
src {
return vaultDownloadUrl()
}
dest new File(buildDir, "hashicorp.zip")
dest layout.buildDirectory.file("downloads/hashicorp.zip")
onlyIfModified true
}

task extractVault(dependsOn: downloadVault, type: Copy) {
from zipTree(downloadVault.dest)
into buildDir
into layout.buildDirectory.dir("vault-bin")
}

task acceptanceTest(dependsOn: [
Expand Down
93 changes: 0 additions & 93 deletions acceptance-tests/src/gatling/scala/Eth2SignSimulation.scala

This file was deleted.

58 changes: 0 additions & 58 deletions acceptance-tests/src/gatling/scala/FcBlsSignSimulation.scala

This file was deleted.

Loading
Loading