Repository navigation
Update CI Java versions to current LTS baseline - #3314
Conversation
📝 WalkthroughWalkthroughGitHub Actions workflows now test JDKs 21, 25, 26 across Linux, macOS, Windows, PR, and multiple Unix/BSD jobs; Linux container-cgroup uses Temurin 21; FFM tests are gated to Linux/macOS/Windows; OshiMetrics tests use JUnit assumptions and platform-aware assertions to skip or relax checks when metrics are absent. ChangesJDK Version Upgrade & Test Guards
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/unix.yaml (1)
186-207:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
testnetbsd-gcc70“Test JDK 21” label isn’t enforced in the SSH script.
The SSH job’sscript:only resets/pulls and runs./mvnw ...—it sets neitherJAVA_HOMEnorPATH, and doesn’t runjava -version, so the JDK is whatever thegcc70.fsffrance.orgaccount defaults to. Either pin OpenJDK 21 explicitly in the SSH script (or add ajava -version/fail-fast check), or adjust the job name to match the actual runtime.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 186 - 207, The SSH step under the testnetbsd-gcc70 job doesn’t enforce JDK 21 because the script block in the step (script:) never sets JAVA_HOME or updates PATH nor validates the runtime; update the script in the testnetbsd-gcc70 job (the SSH action step using appleboy/ssh-action) to either install/select OpenJDK 21 or export JAVA_HOME and adjust PATH to point to a validated JDK 21 before running ./mvnw, and add a quick verification like java -version (and fail-fast if it’s not 21) so the job label truly reflects the runtime.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/unix.yaml:
- Around line 186-207: The SSH step under the testnetbsd-gcc70 job doesn’t
enforce JDK 21 because the script block in the step (script:) never sets
JAVA_HOME or updates PATH nor validates the runtime; update the script in the
testnetbsd-gcc70 job (the SSH action step using appleboy/ssh-action) to either
install/select OpenJDK 21 or export JAVA_HOME and adjust PATH to point to a
validated JDK 21 before running ./mvnw, and add a quick verification like java
-version (and fail-fast if it’s not 21) so the job label truly reflects the
runtime.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a97d6e00-6465-488a-85c8-9c7b12b5812f
📒 Files selected for processing (5)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/windows.yaml.github/workflows/macos.yaml.github/workflows/linux.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 61-61: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🔇 Additional comments (6)
.github/workflows/linux.yaml (1)
46-50: LGTM!Also applies to: 85-103
.github/workflows/macos.yaml (1)
20-25: LGTM!.github/workflows/pr.yaml (1)
43-43: LGTM!.github/workflows/windows.yaml (1)
20-20: LGTM!.github/workflows/unix.yaml (2)
15-33: LGTM!Also applies to: 38-53, 145-183
55-72: ⚡ Quick winOpenIndiana OpenJDK 21:
openjdk21+/usr/jdk/openjdk21align
OpenIndiana Hipster’s IPS defines the OpenJDK 21 runtime component asopenjdk21, and the installed JDK directory is under/usr/jdk/openjdk21(commonly using/usr/jdk/openjdk21/binonPATH). This matches the workflow’spkg install openjdk21andJAVA_HOME=/usr/jdk/openjdk21.
3a34eca to
5ab6797
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3314 +/- ##
============================================
- Coverage 76.38% 76.34% -0.04%
Complexity 76 76
============================================
Files 412 412
Lines 15974 15974
Branches 2583 2583
============================================
- Hits 12201 12196 -5
- Misses 2281 2285 +4
- Partials 1492 1493 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5ab6797 to
2566f77
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/unix.yaml (1)
15-32:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix FreeBSD workflow to install the correct OpenJDK 25 package name (not
openjdk25).The FreeBSD packagesite for
FreeBSD:14:amd64does not contain a package named exactlyopenjdk25, sopkg install -y openjdk25will fail. Adjust the workflow to install the available variant(s) (e.g., theopenjdk25-*packages fromjava/openjdk25) and confirm the resultingJAVA_HOMEinstall path matches the chosen package.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 15 - 32, The FreeBSD job (testfreebsd / step id test-freebsd) is attempting to install a nonexistent package `openjdk25`; update the prepare script to install the actual OpenJDK 25 package(s) available in the FreeBSD repo (for example the `java/openjdk25` collection or the specific `openjdk25-*` runtime/jdk package names) and then set JAVA_HOME and PATH in the run step to the real install location returned by that package (adjust the exported JAVA_HOME in the run block if the package places OpenJDK under a different path). Ensure the prepare step uses the correct pkg install invocation for the chosen package(s) and the run step’s export JAVA_HOME=/usr/local/openjdk25 is replaced with the correct install path for the package you pick.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java`:
- Around line 157-163: The test diskIoRegistered uses assumeTrue(read != null)
but then asserts write is non-null with assertNotNull, which can fail on
disk-less systems; change the write null-check to the same skip pattern by
replacing assertNotNull(write, ...) with assumeTrue(write != null, "No disks
detected on this platform; skipping") (or an equivalent assumeTrue with a clear
message) so both read and write counters use consistent assume-based skipping;
locate this in the diskIoRegistered test where
registry.find("system.disk.io").tag("disk.io.direction",
"write").functionCounter() is assigned to write.
---
Outside diff comments:
In @.github/workflows/unix.yaml:
- Around line 15-32: The FreeBSD job (testfreebsd / step id test-freebsd) is
attempting to install a nonexistent package `openjdk25`; update the prepare
script to install the actual OpenJDK 25 package(s) available in the FreeBSD repo
(for example the `java/openjdk25` collection or the specific `openjdk25-*`
runtime/jdk package names) and then set JAVA_HOME and PATH in the run step to
the real install location returned by that package (adjust the exported
JAVA_HOME in the run block if the package places OpenJDK under a different
path). Ensure the prepare step uses the correct pkg install invocation for the
chosen package(s) and the run step’s export JAVA_HOME=/usr/local/openjdk25 is
replaced with the correct install path for the package you pick.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 75cb790a-5d28-44f7-b636-6a738b6a3c26
📒 Files selected for processing (6)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yamloshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/workflows/pr.yaml
- .github/workflows/windows.yaml
- .github/workflows/linux.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: Test JDK 21, windows-latest
- GitHub Check: Analyze (java)
- GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
- GitHub Check: Test JDK 26, windows-latest
- GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
- GitHub Check: Test JDK 21, macos-latest
- GitHub Check: Test JDK 26, macos-latest
- GitHub Check: Test JDK 25, ubuntu-latest (+ JNA==FFM)
- GitHub Check: JMH Benchmarks, windows-latest
- GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
- GitHub Check: JMH Benchmarks, ubuntu-latest
- GitHub Check: JMH Benchmarks, macos-latest
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/macos.yaml.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🔇 Additional comments (8)
oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java (2)
10-10: LGTM!Also applies to: 19-19, 160-160, 169-169, 176-176, 183-183
284-297: ⚖️ Poor tradeoffValidate NetBSD/DragonFly “>= 0” expectations for process memory metrics
The
processMemoryRegisteredtest now allowsprocess.memory.usageandprocess.memory.virtualto be zero onPlatformEnum.NETBSDandPlatformEnum.DRAGONFLYBSD. Confirm on actual BSD CI runners whether OSHI genuinely reports zeros or whether the NetBSD/DragonFly process memory collectors sometimes return 0 due to an implementation/measurement issue; if zeros are not expected, adjust the OSHI platform code (or tighten the assertions) rather than relaxing the test..github/workflows/macos.yaml (1)
20-25: ⚡ Quick winConfirm Zulu JDK 26 availability for the macOS matrix
The Azul Zulu metadata API returns macOS “AVAILABLE” artifacts for Java 26 for both architectures (macosx_x64 and macosx_aarch64), so
actions/setup-java@v5withdistribution: 'zulu'should be able to provision JDK 26 for the macOS runners in this matrix.# Previous LTS, Current LTS, Current release java: [21, 25, 26] os: [macos-14, macos-15, macos-26] include: - java: 21 os: 'macos-26-intel'.github/workflows/unix.yaml (5)
54-70: ⚡ Quick winCheck OpenJDK 21 package + validate JAVA_HOME path on OpenIndiana.
OpenJDK 21 is present in OpenIndiana’s packaging sources (runtime FMRI
runtime/java/openjdk21/ “openjdk-21”), sopkg install openjdk21is likely correct. The public evidence gathered doesn’t show the on-disk install prefix, so theJAVA_HOME=/usr/jdk/openjdk21assumption should be validated on the VM (e.g., viapkg contents -H runtime/java/openjdk21*and confirming the resulting JDK directory).
139-158: ⚡ Quick winOpenJDK 21 availability + JAVA_HOME path for DragonFly BSD look correct.
openjdk21is available via the DragonFly BSD package repository (pkg install openjdk21), and the install prefix used by the package is/usr/local/openjdk21, soJAVA_HOME=/usr/local/openjdk21in the workflow is appropriate.
101-137: ⚖️ Poor tradeoffAdd a repo-owner guard for the AIX SSH job (or document fork behavior)
In
.github/workflows/unix.yaml, the AIXtestaixjob runsappleboy/ssh-actionwithout anyif: github.repository_owner == 'oshi'conditional, so it would attempt the SSH hostgcc119.fsffrance.orgeven on forks where${{ secrets.AIX_OSHI_KEY }}won’t be available. Was that removal intentional—if not, restore a job/step-level owner conditional (or adjust workflow triggers) to avoid fork CI failures.
160-202: ⚡ Quick winConfirm OpenJDK 21 (pkgsrc) availability and JAVA_HOME path on NetBSD
- NetBSD pkgsrc provides
lang/openjdk21, sopkg_add openjdk21is available.- With the default pkgsrc prefix (
LOCALBASE=/usr/pkg), the JDK is installed under/usr/pkg/java/openjdk21, which matches the workflow’sJAVA_HOME=/usr/pkg/java/openjdk21(and correspondingPATHupdate).
34-52: ⚡ Quick winOpenBSD 7.7 has JDK 21, but
pkg_add jdk%21needs selector validation (it’s not a version wildcard).
- OpenBSD 7.7 includes OpenJDK 21 (e.g., 21.0.6).
- However,
pkg_adddocumentspkgname%branchsemantics for%(not genericjdk-21selection). The actual packages are published with ajdk-21...stem, so ensurepkg_add jdk%21resolves to thejdk-21...packages in the 7.7 repos; otherwise switch to an explicitjdk-21.../correct branch form for the JDK 21 port.
2566f77 to
6175e9e
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/unix.yaml (1)
15-32:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix FreeBSD workflow: validate
openjdk25pkg availability (and add fallback)
In.github/workflows/unix.yaml(testfreebsd), the VM job runspkg install -y openjdk25. Quick checks against FreeBSD’sports.cgiand FreshPorts didn’t findopenjdk25, so this step may fail at runtime. Confirmopenjdk25is available as a binary package for the specific FreeBSD release used byvmactions/freebsd-vm; if not, update the workflow to install an available OpenJDK package (and adjustJAVA_HOMEaccordingly).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 15 - 32, The workflow job testfreebsd currently installs openjdk25 in the prepare step and hardcodes JAVA_HOME in the run step, but openjdk25 may not be available; update the prepare/run blocks to first check which OpenJDK package exists on the FreeBSD image (e.g., pkg search or pkg info for openjdk*), choose a known-available package (fallback to openjdk17 or openjdk18 if openjdk25 is missing), install that package instead of openjdk25, and update the JAVA_HOME export in the run step to match the installed package path so the testfreebsd job (vmactions/freebsd-vm usage) uses a valid JDK.
🧹 Nitpick comments (2)
.github/workflows/unix.yaml (2)
34-52: ⚡ Quick winConsider setting JAVA_HOME explicitly for consistency.
Unlike FreeBSD, DragonFly BSD, and NetBSD jobs, the OpenBSD job doesn't explicitly set
JAVA_HOMEor updatePATHafter installing JDK 21. While the OpenBSDmavenpackage may locate Java automatically, adding explicit environment configuration would improve consistency and reliability across all BSD jobs.Suggested addition for consistency
run: | + export JAVA_HOME=/usr/local/jdk-21 + export PATH=$JAVA_HOME/bin:$PATH mvn clean test -B -Djacoco.skip=trueNote: Verify the correct JAVA_HOME path for OpenBSD's jdk%21 package (commonly
/usr/local/jdk-21or/usr/local/jdk-21.0.x).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 34 - 52, The OpenBSD job (job name testopenbsd, step id test-openbsd using vmactions/openbsd-vm) should explicitly set JAVA_HOME and update PATH after installing jdk%21; modify the prepare or run block to export the correct OpenBSD JDK install path (e.g., /usr/local/jdk-21 or /usr/local/jdk-21.0.x) into JAVA_HOME and prepend $JAVA_HOME/bin to PATH, and ensure these exports occur before invoking mvn so Maven picks up the intended JDK.
20-20: ⚡ Quick winAdd
persist-credentials: falseto checkout actions for security.Multiple checkout actions in this workflow don't set
persist-credentials: false, which is a security best practice. This setting prevents the GitHub token from persisting in the.git/configand being accessible to subsequent steps, reducing the risk of credential exfiltration.Recommended security hardening
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: falseApply this pattern to all
actions/checkoutinvocations at lines 20, 39, 59, 146, and 167.Also applies to: 39-39, 59-59, 146-146, 167-167
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml at line 20, The workflow uses actions/checkout at several steps (entries using the string "uses: actions/checkout@...") without the persist-credentials setting; update each checkout step to include persist-credentials: false under the step's with: block so the GITHUB_TOKEN is not written to .git/config—apply this change to every checkout invocation found (the ones currently pinned like actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd and the other checkout occurrences) to follow the security best practice.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/unix.yaml:
- Around line 15-32: The workflow job testfreebsd currently installs openjdk25
in the prepare step and hardcodes JAVA_HOME in the run step, but openjdk25 may
not be available; update the prepare/run blocks to first check which OpenJDK
package exists on the FreeBSD image (e.g., pkg search or pkg info for openjdk*),
choose a known-available package (fallback to openjdk17 or openjdk18 if
openjdk25 is missing), install that package instead of openjdk25, and update the
JAVA_HOME export in the run step to match the installed package path so the
testfreebsd job (vmactions/freebsd-vm usage) uses a valid JDK.
---
Nitpick comments:
In @.github/workflows/unix.yaml:
- Around line 34-52: The OpenBSD job (job name testopenbsd, step id test-openbsd
using vmactions/openbsd-vm) should explicitly set JAVA_HOME and update PATH
after installing jdk%21; modify the prepare or run block to export the correct
OpenBSD JDK install path (e.g., /usr/local/jdk-21 or /usr/local/jdk-21.0.x) into
JAVA_HOME and prepend $JAVA_HOME/bin to PATH, and ensure these exports occur
before invoking mvn so Maven picks up the intended JDK.
- Line 20: The workflow uses actions/checkout at several steps (entries using
the string "uses: actions/checkout@...") without the persist-credentials
setting; update each checkout step to include persist-credentials: false under
the step's with: block so the GITHUB_TOKEN is not written to .git/config—apply
this change to every checkout invocation found (the ones currently pinned like
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd and the other checkout
occurrences) to follow the security best practice.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cba6c018-0bd6-435f-bba2-a9cb7a651801
📒 Files selected for processing (6)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yamloshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
🚧 Files skipped from review as they are similar to previous changes (5)
- .github/workflows/pr.yaml
- .github/workflows/macos.yaml
- .github/workflows/linux.yaml
- .github/workflows/windows.yaml
- oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🔇 Additional comments (3)
.github/workflows/unix.yaml (3)
54-70: LGTM!
141-181: LGTM!
183-205: 🏗️ Heavy liftVerify JDK 21 is installed and configured on the gcc70 GCC farm server.
The job name was updated to reflect JDK 21, but unlike the NetBSD VM job (lines 177-179), this SSH-based job doesn't set
JAVA_HOMEorPATHin the script. The workflow assumes JDK 21 is pre-installed and configured on thegcc70.fsffrance.orgserver. If the server administrator hasn't updated the environment, the Maven build will fail or run on an older JDK.Consider either:
- Coordinating with the GCC farm administrator to confirm JDK 21 is installed and is the default Java version on gcc70, or
- Adding explicit
JAVA_HOME/PATHsetup in the SSH script similar to the AIX job pattern (lines 120-121)
6175e9e to
b4d781b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/unix.yaml (2)
54-73: Optional: scope down workflow permissions.Static analysis flags this workflow as running with default token permissions and persisting credentials on
checkout. Since these VM jobs only need read access to the repo, adding a top-levelpermissions: { contents: read }block (andpersist-credentials: falseon the checkout steps) would tighten the security posture. This applies workflow-wide rather than to this job specifically, and is pre-existing, so it can be addressed separately.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 54 - 73, Add a top-level permissions block to restrict token scope and set checkout to not persist credentials: add permissions: { contents: read } at the workflow root, and update each actions/checkout step (e.g., the checkout in the testopenindiana job) to include persist-credentials: false; this keeps jobs like testopenindiana and other VM jobs read-only while preventing the default token from being stored in the workspace.
90-95: ⚡ Quick winRemove the temporary JDK-exploration debug block.
Lines 90–95 look like debugging artifacts left in from investigating JDK availability on
gcc211(the job still targets JDK 11, yet it probes forjdk-17and runs a filesystem-widefind /). These add noise and runtime to the SSH job without affecting the test run and should be dropped before merge.♻️ Proposed cleanup
set -e source .profile - echo "=== JDK exploration ===" - find / -name "javac" -o -name "java" 2>/dev/null | grep -v proc | head -10 - ls ~/java/ 2>/dev/null || echo "no ~/java" - /usr/jdk/instances/jdk-17/bin/java -version 2>&1 || echo "no jdk-17 in /usr/jdk" - pkg list '*jdk*' 2>/dev/null || echo "pkg list failed" - echo "=== END exploration ===" cd ~/git/oshiIf this exploration is intentional and you want to keep it temporarily, I can open a tracking issue to remove it later.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/unix.yaml around lines 90 - 95, Remove the temporary JDK-exploration debug block bounded by the echo markers "=== JDK exploration ===" and "=== END exploration ===" in the unix.yaml SSH job (the lines running find /, ls ~/java, /usr/jdk/instances/jdk-17/bin/java -version and pkg list '*jdk*'); delete these lines so the workflow no longer performs the filesystem-wide find and JDK-17 probes (or alternatively comment them out with a TODO/issue reference if you need them temporarily).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/unix.yaml:
- Around line 65-70: The workflow sets JAVA_HOME incorrectly for OpenIndiana
Hipster's openjdk21; update the environment exports in the unix.yaml step to use
the OpenIndiana installation path by exporting
JAVA_HOME=/usr/jdk/instances/openjdk21 (ensure PATH uses $JAVA_HOME/bin:$PATH)
so that the subsequent java -version and ./mvnw commands pick up the correct JDK
installation rather than an unintended java.
---
Nitpick comments:
In @.github/workflows/unix.yaml:
- Around line 54-73: Add a top-level permissions block to restrict token scope
and set checkout to not persist credentials: add permissions: { contents: read }
at the workflow root, and update each actions/checkout step (e.g., the checkout
in the testopenindiana job) to include persist-credentials: false; this keeps
jobs like testopenindiana and other VM jobs read-only while preventing the
default token from being stored in the workspace.
- Around line 90-95: Remove the temporary JDK-exploration debug block bounded by
the echo markers "=== JDK exploration ===" and "=== END exploration ===" in the
unix.yaml SSH job (the lines running find /, ls ~/java,
/usr/jdk/instances/jdk-17/bin/java -version and pkg list '*jdk*'); delete these
lines so the workflow no longer performs the filesystem-wide find and JDK-17
probes (or alternatively comment them out with a TODO/issue reference if you
need them temporarily).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 97cf1def-b146-49ae-a16f-1f525b2397c9
📒 Files selected for processing (6)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yamloshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
🚧 Files skipped from review as they are similar to previous changes (5)
- .github/workflows/pr.yaml
- .github/workflows/windows.yaml
- .github/workflows/macos.yaml
- oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
- .github/workflows/linux.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
- GitHub Check: JMH Benchmarks, ubuntu-latest
- GitHub Check: Test JDK 26, macos-latest
- GitHub Check: Test JDK 26, windows-latest
- GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
- GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
- GitHub Check: JMH Benchmarks, windows-latest
- GitHub Check: Analyze (java)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: JMH Benchmarks, macos-latest
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 55-73: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🔇 Additional comments (5)
.github/workflows/unix.yaml (5)
28-32: FreeBSD JDK 25 path confirmed.
/usr/local/openjdk25is the correctJAVA_HOMEfor the FreeBSDopenjdk25port. The most current version is java/openjdk25, with java/openjdk24, java/openjdk23, java/openjdk22, java/openjdk21, java/openjdk17, java/openjdk11, and java/openjdk8, also available. The export path also matches what FreeBSD users report for this port: export JAVA_HOME="/usr/local/openjdk25".
49-52: LGTM!
159-162: LGTM!
180-182: LGTM!
84-84: ⚡ Quick winEnsure
GCC_CI_KEYsecret + remoteauthorized_keysfor the three SSH hosts
.github/workflows/unix.yamlnow consistently useskey: ${{ secrets.GCC_CI_KEY }}for the Solaris SPARC (gcc211), AIX (gcc119), and NetBSD GCC-farm (gcc70) jobs (no remainingAIX_OSHI_KEYreferences in the workflows). Still ensure theGCC_CI_KEYrepo/org secret exists and its public key is present in~oshi/.ssh/authorized_keyson all three hosts to avoid SSH handshake failures.
| pkg install openjdk21 | ||
| run: | | ||
| wget https://download.bell-sw.com/java/11.0.15.1+2/bellsoft-jdk11.0.15.1+2-solaris-x64-lite.tar.gz -nv | ||
| gunzip bellsoft-jdk11.0.15.1+2-solaris-x64-lite.tar.gz | ||
| tar xf bellsoft-jdk11.0.15.1+2-solaris-x64-lite.tar | ||
| rm bellsoft-jdk11.0.15.1+2-solaris-x64-lite.tar | ||
| mv jdk-11.0.15.1-lite /var/tmp | ||
| export JAVA_HOME=/var/tmp/jdk-11.0.15.1-lite | ||
| export PATH=$JAVA_HOME:$PATH | ||
| export JAVA_HOME=/usr/jdk/openjdk21 | ||
| export PATH=$JAVA_HOME/bin:$PATH | ||
| java -version | ||
| ./mvnw clean test -B -Djacoco.skip=true -Dmaven.gitcommitid.skip=true |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
OpenIndiana hipster pkg openjdk21 install directory path JAVA_HOME
💡 Result:
On OpenIndiana Hipster, you can install OpenJDK 21 using the Image Package System (IPS) via the following command: pfexec pkg install runtime/java/openjdk21 Based on the standard OpenIndiana directory structure and build system configurations, the typical installation path for OpenJDK 21 is: /usr/jdk/instances/openjdk21 Consequently, to set the JAVA_HOME environment variable to point to this installation, you should use the following path: export JAVA_HOME=/usr/jdk/instances/openjdk21 You can verify the installation by checking for the presence of the java executable in that directory, such as running /usr/jdk/instances/openjdk21/bin/java -version [1][2][3].
Citations:
- 1: OpenIndiana/oi-userland@116f1f7
- 2: 6.0.0:
test_cimport_supportfails PyCQA/isort#2355 - 3: OpenIndiana/oi-userland@6f9710f
Fix JAVA_HOME for OpenIndiana Hipster openjdk21
runtime/java/openjdk21 is typically installed under /usr/jdk/instances/openjdk21 on OpenIndiana, so JAVA_HOME=/usr/jdk/openjdk21 is likely wrong (making PATH/java -version pick up an unintended java). Update .github/workflows/unix.yaml to set JAVA_HOME=/usr/jdk/instances/openjdk21.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/unix.yaml around lines 65 - 70, The workflow sets
JAVA_HOME incorrectly for OpenIndiana Hipster's openjdk21; update the
environment exports in the unix.yaml step to use the OpenIndiana installation
path by exporting JAVA_HOME=/usr/jdk/instances/openjdk21 (ensure PATH uses
$JAVA_HOME/bin:$PATH) so that the subsequent java -version and ./mvnw commands
pick up the correct JDK installation rather than an unintended java.
804a506 to
afc1bf4
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/unix.yaml:
- Around line 55-59: The testopenindiana job currently inherits full workflow
GITHUB_TOKEN and leaves credentials in the workspace; restrict its permissions
by adding a job-level permissions block with contents: read, and update the
actions/checkout step used in that job
(actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd) to set
persist-credentials: false so the token is not written into the workspace before
handing off to the VM.
- Around line 90-105: The job labeled "Test JDK 11, Solaris SPARC" currently
provisions /opt/cfarm/jdk-17 and downloads JDK 17 but never enforces JAVA_HOME
before running ./mvnw; either change the provisioning to JDK 11 (use
/opt/cfarm/jdk-11 and JDK 11 download URLs and extraction names) or rename the
job to indicate JDK 17 and explicitly set JAVA_HOME and PATH after extraction
(e.g., export JAVA_HOME=/opt/cfarm/jdk-17; export PATH=$JAVA_HOME/bin:$PATH) and
verify with $JAVA_HOME/bin/java -version before invoking ./mvnw (ensure this
happens after source .profile).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: afbf2a60-3666-4ebf-a231-21edd0b36d95
📒 Files selected for processing (11)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yamloshi-core-ffm/src/test/java/oshi/ffm/ForeignFunctionsTest.javaoshi-core-ffm/src/test/java/oshi/ffm/GlobalMemoryFFMTest.javaoshi-core-ffm/src/test/java/oshi/ffm/OperatingSystemFFMTest.javaoshi-core-ffm/src/test/java/oshi/ffm/SystemInfoTest.javaoshi-core-ffm/src/test/java/oshi/ffm/VirtualMemoryFFMTest.javaoshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
✅ Files skipped from review due to trivial changes (2)
- .github/workflows/pr.yaml
- .github/workflows/macos.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/workflows/windows.yaml
- .github/workflows/linux.yaml
- oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Analyze (java)
- GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
- GitHub Check: Test JDK 26, macos-latest
- GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
- GitHub Check: JMH Benchmarks, windows-latest
- GitHub Check: JMH Benchmarks, macos-latest
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 55-73: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🔇 Additional comments (6)
oshi-core-ffm/src/test/java/oshi/ffm/ForeignFunctionsTest.java (1)
17-17: LGTM!Also applies to: 19-19, 27-27
oshi-core-ffm/src/test/java/oshi/ffm/GlobalMemoryFFMTest.java (1)
23-23: LGTM!Also applies to: 25-25, 31-31
oshi-core-ffm/src/test/java/oshi/ffm/OperatingSystemFFMTest.java (1)
29-29: LGTM!oshi-core-ffm/src/test/java/oshi/ffm/SystemInfoTest.java (1)
40-40: LGTM!Also applies to: 42-42, 54-54
oshi-core-ffm/src/test/java/oshi/ffm/VirtualMemoryFFMTest.java (1)
16-16: LGTM!Also applies to: 18-18, 23-23
.github/workflows/unix.yaml (1)
17-31: LGTM!Also applies to: 37-52, 161-199
| testopenindiana: | ||
| name: Test JDK 21, OpenIndiana | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
There was a problem hiding this comment.
Minimize token exposure before handing the repo to the VM.
This new job only needs a read-only checkout, but it inherits the workflow’s default GITHUB_TOKEN permissions and persists that credential into the workspace before passing it to a third-party VM action. Set the job token to contents: read and disable checkout credential persistence here.
🔐 Minimal hardening change
testopenindiana:
name: Test JDK 21, OpenIndiana
runs-on: ubuntu-24.04
+ permissions:
+ contents: read
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Test on OpenIndiana🧰 Tools
🪛 zizmor (1.25.2)
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 55-73: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/unix.yaml around lines 55 - 59, The testopenindiana job
currently inherits full workflow GITHUB_TOKEN and leaves credentials in the
workspace; restrict its permissions by adding a job-level permissions block with
contents: read, and update the actions/checkout step used in that job
(actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd) to set
persist-credentials: false so the token is not written into the workspace before
handing off to the VM.
afc1bf4 to
f0808d2
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/unix.yaml:
- Around line 47-52: The workflow installs jdk%21 but never pins Maven to that
JDK; update the job so the run step uses the installed JDK 21 by exporting
JAVA_HOME and prepending its bin to PATH (or invoking mvn with env vars) before
calling the existing mvn clean test -B -Djacoco.skip=true; specifically, after
the prepare step that runs pkg_add jdk%21, set JAVA_HOME to the JDK 21 install
directory and do PATH="$JAVA_HOME/bin:$PATH" (or use env JAVA_HOME=... PATH=...
mvn ...) so the mvn command uses JDK 21.
- Line 198: The job labeled testnetbsd-gcc70 merely updates the display name but
doesn’t pin JDK 21; modify the testnetbsd-gcc70 job’s SSH script block (the
section that currently runs ./mvnw clean test ...) to install or select JDK 21
and set JAVA_HOME and PATH before invoking ./mvnw (e.g., install or point
JAVA_HOME to the JDK 21 installation, export JAVA_HOME, update PATH, and run
java -version to verify), so the workflow actually runs under JDK 21 rather than
relying on the display name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7fe001e4-6a9d-4357-b861-6f8b1a378d75
📒 Files selected for processing (11)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/unix.yaml.github/workflows/windows.yamloshi-core-ffm/src/test/java/oshi/ffm/ForeignFunctionsTest.javaoshi-core-ffm/src/test/java/oshi/ffm/GlobalMemoryFFMTest.javaoshi-core-ffm/src/test/java/oshi/ffm/OperatingSystemFFMTest.javaoshi-core-ffm/src/test/java/oshi/ffm/SystemInfoTest.javaoshi-core-ffm/src/test/java/oshi/ffm/VirtualMemoryFFMTest.javaoshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
✅ Files skipped from review due to trivial changes (2)
- .github/workflows/linux.yaml
- .github/workflows/windows.yaml
🚧 Files skipped from review as they are similar to previous changes (8)
- .github/workflows/pr.yaml
- .github/workflows/macos.yaml
- oshi-core-ffm/src/test/java/oshi/ffm/SystemInfoTest.java
- oshi-core-ffm/src/test/java/oshi/ffm/OperatingSystemFFMTest.java
- oshi-core-ffm/src/test/java/oshi/ffm/ForeignFunctionsTest.java
- oshi-core-ffm/src/test/java/oshi/ffm/VirtualMemoryFFMTest.java
- oshi-core-ffm/src/test/java/oshi/ffm/GlobalMemoryFFMTest.java
- oshi-metrics/src/test/java/oshi/metrics/OshiMetricsTest.java
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
- GitHub Check: Test JDK 26, macos-latest
- GitHub Check: JMH Benchmarks, macos-latest
- GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
- GitHub Check: JMH Benchmarks, windows-latest
- GitHub Check: Analyze (java)
- GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.
Applied to files:
.github/workflows/unix.yaml
🪛 zizmor (1.25.2)
.github/workflows/unix.yaml
[warning] 59-59: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 55-73: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🔇 Additional comments (1)
.github/workflows/unix.yaml (1)
90-103: The SPARC lane still provisions JDK 17 under a JDK 11 contract.This block downloads and exports
/opt/cfarm/jdk-17.0.19, so it no longer matches theTest JDK 11, Solaris SPARCtarget on Line 75. Either switch the provisioning back to JDK 11 or rename the job/objective to JDK 17.
| # SSH into NetBSD server on GCC Compile Farm and run tests | ||
| testnetbsd-gcc70: | ||
| name: Test JDK 11, NetBSD (GCC farm) | ||
| name: Test JDK 21, NetBSD (GCC farm) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the exact sections around the referenced lines
sed -n '160,240p' .github/workflows/unix.yaml | nl -ba | sed -n '1,120p'
# Also inspect the referenced later range more tightly
sed -n '190,230p' .github/workflows/unix.yaml | nl -ba
# Find any matrix entries / job parameters mentioning NetBSD, gcc70, or JDK
rg -n --hidden --no-ignore-vcs -S "NetBSD|netbsd|gcc70|JDK|jdk|temurin|setup-java|java-version|baseline|GCC farm" .github/workflows/unix.yamlRepository: oshi/oshi
Length of output: 96
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/unix.yaml"
[ -f "$file" ] || { echo "Missing $file"; exit 1; }
echo "=== unix.yaml 160-240 ==="
sed -n '160,240p' "$file" | awk '{printf "%d\t%s\n", NR+159, $0}'
echo "=== unix.yaml 190-230 ==="
sed -n '190,230p' "$file" | awk '{printf "%d\t%s\n", NR+189, $0}'
echo "=== Search for lane identifiers and JDK pinning ==="
rg -n -S "NetBSD|netbsd|gcc70|GCC farm|JDK|jdk|temurin|setup-java|java-version|baseline" "$file"Repository: oshi/oshi
Length of output: 5062
Pin the GCC-farm NetBSD job’s JDK (the display name isn’t enough).
In .github/workflows/unix.yaml, the testnetbsd-gcc70 lane only updates name: Test JDK 21, NetBSD (GCC farm), but the SSH script never sets JAVA_HOME / installs a specific JDK— it just runs ./mvnw clean test ..., so it won’t actually enforce JDK 21 and can drift with gcc70’s defaults.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/unix.yaml at line 198, The job labeled testnetbsd-gcc70
merely updates the display name but doesn’t pin JDK 21; modify the
testnetbsd-gcc70 job’s SSH script block (the section that currently runs ./mvnw
clean test ...) to install or select JDK 21 and set JAVA_HOME and PATH before
invoking ./mvnw (e.g., install or point JAVA_HOME to the JDK 21 installation,
export JAVA_HOME, update PATH, and run java -version to verify), so the workflow
actually runs under JDK 21 rather than relying on the display name.
f0808d2 to
726bd98
Compare
Main platforms (Linux, macOS, Windows): - Matrix: [21, 25, 26] (previous LTS, current LTS, current release) - ARM include: JDK 21 (was 17) - Container cgroup test: JDK 21 (was 17) Unix VMs (bump to highest available): - FreeBSD: JDK 25 (was 11) - OpenBSD: JDK 21 (was 11) - DragonFly BSD: JDK 21 (was 11) - NetBSD: JDK 21 (was 11) - OpenIndiana: JDK 21, replaces Solaris 11.4 VM SSH machines: - Solaris SPARC (gcc211): JDK 11 (OS too old for JDK 17 binaries) - AIX (gcc119): JDK 17 Other changes: - Remove repository_owner gates (GCC_CI_KEY available on all repos) - Rename secret from AIX_OSHI_KEY to GCC_CI_KEY - Gate FFM tests to supported platforms (Linux, macOS, Windows) via @EnabledOnOs — fixes failures when running on BSD with JDK 25 - Fix oshi-metrics tests: use assumeTrue for absent disk metrics, platform-gated assertions for process memory on BSD VMs
726bd98 to
899372a
Compare
Summary
Update CI Java versions across all workflows to target current LTS releases:
Main platforms (Linux, macOS, Windows):
Unix VMs (bumped to highest available):
Unchanged (constrained environments):
Lint & Benchmarks: Remain on JDK 25 (required for oshi-core-ffm)
All version-based conditionals (
contains(matrix.java, '25')for coverage/FFM) remain correct since 25 is still in the matrix.Test plan
Summary by CodeRabbit