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

build: require a fixed 'major.minor.patch' Java version to be installed #13108

Merged
merged 2 commits into from
May 16, 2024

Conversation

jjohannes
Copy link
Collaborator

@jjohannes jjohannes commented May 7, 2024

Description:

This PR effectively removes using the Gradle Java Toolchains feature, as it cannot be used to auto-download a precise JDK version (see gradle/gradle#16628 (comment)). After experimenting with different things, I came to the conclusion that this is the best solution with current Gradle features.

This requires users to have the exact JDK required installed. This is documented in the "quickstart" guides once #12813 is merged.

I'll advocate for improving Gradle in this area and keep #12798 open for a better solution in the future. More details in that issue.

Related issue(s):

A first solution for #12798

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Restart) Results

2 tests   2 ✅  7m 56s ⏱️
2 suites  0 💤
2 files    0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Node Death Reconnect) Results

2 tests   2 ✅  8m 59s ⏱️
2 suites  0 💤
2 files    0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Token) Results

235 tests   233 ✅  21m 18s ⏱️
 17 suites    2 💤
 17 files      0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Crypto) Results

335 tests   335 ✅  40m 13s ⏱️
 25 suites    0 💤
 25 files      0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Misc) Results

464 tests   454 ✅  39m 58s ⏱️
 77 suites   10 💤
 77 files      0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Time Consuming) Results

21 tests   21 ✅  54m 19s ⏱️
 3 suites   0 💤
 3 files     0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: Unit Test Results

  2 305 files  ±0    2 305 suites  ±0   3h 11m 10s ⏱️ - 36m 30s
118 955 tests ±0  118 888 ✅ ±0  67 💤 ±0  0 ❌ ±0 
127 516 runs  ±0  127 449 ✅ ±0  67 💤 ±0  0 ❌ ±0 

Results for commit 3553bb1. ± Comparison against base commit 0288a4b.

This pull request removes 3974 and adds 3738 tests. Note that renamed tests count towards both.

  
             IssuerDN: CN=s-aaaa
            SubjectDN: CN=s-aaaa
           Final Date: Fri Jan 01 00:00:00 UTC 2100
           Public Key: RSA Public Key [2e:28:bc:1e:d3:83:25:92:8e:cb:98:b1:b6:84:06:9c:d5:d8:14:d5],[56:66:d1:a4]
           Start Date: Sat Jan 01 00:00:00 UTC 2000
         SerialNumber: 12482092706667292405
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5…
   Address[id=0,nickname=8G6N45rx,selfName=aaaa,weight=1000,hostnameInternal=127.0.0.1,portInternalIpv4=56395,hostnameExternal=2.251.120.77,portExternalIpv4=56395,sigPublicKey=<null>,agreePublicKey=<null>,sigCert=com.swirlds.platform.crypto.SerializableX509Certificate@5f12058,agreeCert=com.swirlds.platform.crypto.SerializableX509Certificate@63c8a64d,memo=6qQ8s7Xl],
…
com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [4] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [6] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [7]   
  
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [10] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@525a382d
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [11] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@48ec4289
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [12] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@3b6501da
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [13] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@64ea087a
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [14] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@6c0f1a0a
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [15] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@84d4790c
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [16] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@75c7756b
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 7, 2024

Node: HAPI Test (Smart Contract) Results

592 tests   592 ✅  1h 13m 6s ⏱️
 63 suites    0 💤
 63 files      0 ❌

Results for commit 3553bb1.

♻️ This comment has been updated with latest results.

@jjohannes jjohannes marked this pull request as ready for review May 7, 2024 13:10
@jjohannes jjohannes requested review from a team as code owners May 7, 2024 13:10
@jjohannes jjohannes self-assigned this May 7, 2024
@jjohannes
Copy link
Collaborator Author

jjohannes commented May 15, 2024

Thank you for the feedback @anthony-swirldslabs. I am also not super happy.
I changed this to only fail in cases where the build will not work at all (as it was before).
In other cases, we print a warning if the version does not match exactly. This allows for experimentation and does not block you if you don't have the right minor version handy. The build works then, but wont't pull compilation results from the remote cache.

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.72%. Comparing base (0288a4b) to head (3553bb1).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #13108      +/-   ##
=============================================
- Coverage      61.73%   61.72%   -0.01%     
+ Complexity     31226    31223       -3     
=============================================
  Files           3442     3442              
  Lines         141267   141267              
  Branches       14780    14778       -2     
=============================================
- Hits           87207    87199       -8     
- Misses         50176    50185       +9     
+ Partials        3884     3883       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anthony-swirldslabs
Copy link
Contributor

Thanks, @jjohannes . The new version of the fix looks great. Approved.

@jeromy-cannon jeromy-cannon merged commit 109caa1 into develop May 16, 2024
47 of 48 checks passed
@jeromy-cannon jeromy-cannon deleted the 12798-fixed-java-version branch May 16, 2024 08:58
bilyana-gospodinova pushed a commit that referenced this pull request Jun 13, 2024
…ed (#13108)

Signed-off-by: Jendrik Johannes <[email protected]>
Signed-off-by: Bilyana Gospodinova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants