Skip to content

Switch Solaris SPARC CI to cfarm216/JDK 17, OpenBSD to JDK 25 - #3323

Merged
dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:cfarm216-solaris-sparc
Jun 3, 2026
Merged

dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:cfarm216-solaris-sparc

Conversation

@dbwiddis

@dbwiddis dbwiddis commented Jun 3, 2026 •

Copy link
Copy Markdown
Member
  • Replace gcc211 (Solaris 11.3, JDK 11) with cfarm216 (Solaris 11.4, JDK 17)
  • Upgrade OpenBSD from JDK 21 to JDK 25 (7.9 has the package)
  • Remove -Dlicense.skip=true (not needed with JDK 17)

Closes #3066

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • File system output now displays additional file store information
  • Chores

    • Updated OpenBSD CI testing environment to JDK 25
    • Reconfigured Solaris SPARC CI testing environment

@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 22258d06-8945-4550-924b-1e00087437d1

📥 Commits

Reviewing files that changed from the base of the PR and between 43d7c88 and c4c9dc3.

📒 Files selected for processing (2)
  • .github/workflows/unix.yaml
  • oshi-common/src/main/java/oshi/util/SystemInfoHelper.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • oshi-common/src/main/java/oshi/util/SystemInfoHelper.java
  • .github/workflows/unix.yaml
📜 Recent 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). (14)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Test JDK 21, macos-latest
  • GitHub Check: Test JDK 26, windows-latest
  • GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 21, windows-latest
  • GitHub Check: Test JDK 26, macos-latest
  • GitHub Check: Test JDK 25, ubuntu-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
  • GitHub Check: Analyze (java)
  • GitHub Check: JMH Benchmarks, ubuntu-latest
  • GitHub Check: Test JDK 25, FreeBSD (+ JNA==FFM)
  • GitHub Check: JMH Benchmarks, windows-latest
  • GitHub Check: JMH Benchmarks, macos-latest
  • GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)

📝 Walkthrough

Walkthrough

OpenBSD and Solaris SPARC CI jobs are reconfigured: OpenBSD upgrades to JDK 25, and Solaris SPARC targets a new remote host with module-scoped Maven testing. SystemInfoHelper switches to true file-store enumeration when printing filesystem details.

Changes

Unix CI and Runtime Diagnostics

Layer / File(s) Summary
OpenBSD JDK 25 migration
.github/workflows/unix.yaml
OpenBSD CI job display name and VM JDK package updated from version 21 to version 25.
Solaris SPARC job reconfiguration
.github/workflows/unix.yaml
Solaris SPARC SSH job reconfigured to use cfarm216.cfarm.net with new concurrency group, remote working directory ~/oshi, git reset/checkout/pull sequence, and Maven test invocation with module selection (-pl oshi-common,oshi-core) and system properties; removed -Dlicense.skip=true while retaining -Djacoco.skip=true.
SystemInfoHelper filesystem enumeration
oshi-common/src/main/java/oshi/util/SystemInfoHelper.java
File-store iteration in printFileSystem() switched from getFileStores() to getFileStores(true), altering which OSFileStore entries are included in output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit's burrow grows with care,
So too CI pipelines everywhere,
JDK twenty-five now runs so fast,
On OpenBSD, Java's here at last! 🐰🔧

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: switching Solaris SPARC CI to cfarm216/JDK 17 and upgrading OpenBSD CI to JDK 25, which matches the primary changes in the pull request.
Linked Issues check ✅ Passed The PR addresses issue #3066 by upgrading OpenBSD to JDK 25 (expected to resolve JNA loading issues) and replacing gcc211 with cfarm216 (JDK 17) for Solaris SPARC CI, matching the stated objectives.
Out of Scope Changes check ✅ Passed All changes are in scope: workflow updates for CI infrastructure (OpenBSD JDK upgrade, Solaris SPARC server migration) and a minor modification to SystemInfoHelper to use filtered file stores, which is a supporting change for the infrastructure updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dbwiddis
dbwiddis force-pushed the cfarm216-solaris-sparc branch 3 times, most recently from 14e7d2f to 88e7bf2 Compare June 3, 2026 21:01
@codecov

codecov Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.91%. Comparing base (d743b47) to head (c4c9dc3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3323   +/-   ##
=========================================
  Coverage     74.91%   74.91%           
  Complexity       76       76           
=========================================
  Files           455      455           
  Lines         17492    17492           
  Branches       2872     2872           
=========================================
  Hits          13105    13105           
- Misses         2788     2790    +2     
+ Partials       1599     1597    -2     
Flag Coverage Δ
freebsd 30.73% <100.00%> (ø)
linux 37.71% <100.00%> (+0.03%) ⬆️
macos 38.00% <100.00%> (+0.01%) ⬆️
windows 45.20% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbwiddis
dbwiddis force-pushed the cfarm216-solaris-sparc branch from 88e7bf2 to 43d7c88 Compare June 3, 2026 21:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
oshi-core/src/test/java/oshi/SystemInfoTest.java (1)

78-90: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Timing measurements are off-by-one.

The elapsed time logged at line 88 with the message "Checking Installed Apps... ({}ms)" actually measures the time for the previous operations (SystemInfo initialization + printOperatingSystem, lines 79-86), not for Installed Apps. The pattern repeats throughout: each "Checking X... ({}ms)" log prints the duration of the prior section, not section X.

This makes the timing information fundamentally misleading. Users will interpret "Checking Installed Apps... (100ms)" as meaning Installed Apps took 100ms, when it actually means the prior operations took 100ms.

🔧 Proposed fix: Move timing log after each operation

Restructure to log timing after each operation completes:

 logger.info("Initializing System...");
-long t = System.currentTimeMillis();
 SystemInfo si = new SystemInfo();

 HardwareAbstractionLayer hal = si.getHardware();
 OperatingSystem os = si.getOperatingSystem();

 List<String> lines = new ArrayList<>();

+long t = System.currentTimeMillis();
 printOperatingSystem(lines, os);
+logger.info("Checked Operating System ({}ms)", System.currentTimeMillis() - t);

-logger.info("Checking Installed Apps... ({}ms)", System.currentTimeMillis() - t);
 t = System.currentTimeMillis();
 printInstalledApps(lines, os.getInstalledApplications());
+logger.info("Checked Installed Apps ({}ms)", System.currentTimeMillis() - t);

-logger.info("Checking computer system... ({}ms)", System.currentTimeMillis() - t);
 t = System.currentTimeMillis();
 printComputerSystem(lines, hal.getComputerSystem());
+logger.info("Checked computer system ({}ms)", System.currentTimeMillis() - t);

Apply this pattern to all remaining sections (lines 96-170) so each timing log accurately reflects the duration of the operation it describes.

🤖 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 `@oshi-core/src/test/java/oshi/SystemInfoTest.java` around lines 78 - 90, The
timing logs are off-by-one because t is set before the operation but logged
before the next operation; update the pattern around SystemInfo initialization
and subsequent calls (variables t, SystemInfo, hal, os, printOperatingSystem,
printInstalledApps, logger.info) so each "Checking X... ({}ms)" is logged after
the corresponding operation finishes: capture t before the operation, run the
operation (e.g., printOperatingSystem(lines, os) or printInstalledApps(lines,
os.getInstalledApplications())), then call logger.info with
System.currentTimeMillis() - t; apply this change to all similar sections so
each timing message measures the operation it describes.
🤖 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:
- Line 92: The workflow's testsolaris_sparc job is targeting host:
cfarm216.cfarm.net but CI logs show it's hitting gcc211.fsffrance.org and
failing SSH auth with secrets.GCC_CI_KEY; update the unix.yaml testsolaris_sparc
job so the host entry is the actual reachable Solaris SPARC machine that has the
GCC_CI_KEY public key installed for user oshi (or install the public key for
oshi on cfarm216.cfarm.net), ensure the workflow runner has access to the
secrets.GCC_CI_KEY and that the SSH step uses that secret for authentication
before any CD command (e.g., validate host value, confirm authorized_keys
contains the public key for user oshi, and rerun the job to verify SSH succeeds
prior to running cd ~/oshi).

In `@oshi-core/src/test/java/oshi/SystemInfoTest.java`:
- Around line 168-170: The timer for the final section is never logged: after
resetting t and calling printPrinters(lines, hal.getPrinters()) you must compute
the elapsed time using t and log it via logger.info with an appropriate label
(e.g., "Checking Printers... ({}ms)"); ensure you reference the same variable t
and the call printPrinters(lines, hal.getPrinters()) so the duration is measured
and logged, and once you apply the earlier off-by-one fix to the preceding
sections also make sure this final timing remains consistent with the other
logger.info calls.

---

Outside diff comments:
In `@oshi-core/src/test/java/oshi/SystemInfoTest.java`:
- Around line 78-90: The timing logs are off-by-one because t is set before the
operation but logged before the next operation; update the pattern around
SystemInfo initialization and subsequent calls (variables t, SystemInfo, hal,
os, printOperatingSystem, printInstalledApps, logger.info) so each "Checking
X... ({}ms)" is logged after the corresponding operation finishes: capture t
before the operation, run the operation (e.g., printOperatingSystem(lines, os)
or printInstalledApps(lines, os.getInstalledApplications())), then call
logger.info with System.currentTimeMillis() - t; apply this change to all
similar sections so each timing message measures the operation it describes.
🪄 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: 9bd6ee69-faca-4d7d-9d18-03d5180d4790

📥 Commits

Reviewing files that changed from the base of the PR and between 88e7bf2 and 43d7c88.

📒 Files selected for processing (3)
  • .github/workflows/unix.yaml
  • oshi-common/src/main/java/oshi/util/SystemInfoHelper.java
  • oshi-core/src/test/java/oshi/SystemInfoTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • oshi-common/src/main/java/oshi/util/SystemInfoHelper.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). (16)
  • GitHub Check: Analyze (java)
  • GitHub Check: Test JDK 26, windows-latest
  • GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 21, windows-latest
  • GitHub Check: Test JDK 25, ubuntu-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 26, ubuntu-latest
  • GitHub Check: Test JDK 21, ubuntu-latest
  • GitHub Check: Test JDK 26, macos-latest
  • GitHub Check: Test JDK 21, macos-latest
  • GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
  • GitHub Check: JMH Benchmarks, windows-latest
  • GitHub Check: JMH Benchmarks, ubuntu-latest
  • GitHub Check: JMH Benchmarks, macos-latest
  • GitHub Check: Test JDK 25, FreeBSD (+ JNA==FFM)
  • GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
  • GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3310
File: oshi-core/src/main/java/oshi/software/os/unix/netbsd/NetBsdOperatingSystem.java:164-166
Timestamp: 2026-05-31T04:49:16.646Z
Learning: In the oshi/oshi project, the NetBSD platform intentionally removes all JNA/native library dependencies (PR `#3310`). `NetBsdOperatingSystem.getThreadId()` uses `(int) Thread.currentThread().getId()` rather than `NetBsdLibc._lwp_self()` because the JNA native library is not bundled with the Maven dependency for the NetBSD platform. The mismatch between Java thread ids and kernel LWP ids is an accepted trade-off. Do not suggest reintroducing JNA-based calls (such as `NetBsdLibc._lwp_self()`) in NetBSD platform code.
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3307
File: .github/workflows/netbsd.yaml:4-8
Timestamp: 2026-05-30T02:27:59.447Z
Learning: In the oshi/oshi repository, the `.github/workflows/netbsd.yaml` CI workflow intentionally triggers only on `push` to the `netbsd-port` branch during development. Before the final merge to master, NetBSD CI will be integrated into the main Unix CI workflow (e.g., `.github/workflows/pr.yaml` or equivalent). Do not flag the limited trigger scope as an issue on this PR.
📚 Learning: 2026-05-30T02:27:59.447Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3307
File: .github/workflows/netbsd.yaml:4-8
Timestamp: 2026-05-30T02:27:59.447Z
Learning: In the oshi/oshi repository, the `.github/workflows/netbsd.yaml` CI workflow intentionally triggers only on `push` to the `netbsd-port` branch during development. Before the final merge to master, NetBSD CI will be integrated into the main Unix CI workflow (e.g., `.github/workflows/pr.yaml` or equivalent). Do not flag the limited trigger scope as an issue on this PR.

Applied to files:

  • .github/workflows/unix.yaml
📚 Learning: 2026-03-29T20:01:06.452Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3014
File: oshi-core-java11/src/main/java/module-info.java:10-17
Timestamp: 2026-03-29T20:01:06.452Z
Learning: In the oshi project, `oshi-core-java25/src/main/java/module-info.java` intentionally does NOT export `oshi.util.platform.unix.freebsd`, `oshi.util.platform.unix.openbsd`, or `oshi.util.platform.unix.solaris`, because the FFM (Foreign Function & Memory) implementation only supports Windows, macOS, and Linux. This differs from `oshi-core-java11/src/main/java/module-info.java` which exports all Unix platform packages. The asymmetry is by design.

Applied to files:

  • .github/workflows/unix.yaml
📚 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
🔇 Additional comments (4)
.github/workflows/unix.yaml (4)

47-47: LGTM!

Also applies to: 59-59


82-86: LGTM!


100-103: Verify the remote working directory path on the new host.

The working directory changed from ~/git/oshi to ~/oshi (line 103). This path must match the actual directory structure on cfarm216.cfarm.net, or all subsequent git commands will fail.

Confirm during the first workflow run that:

  • The directory ~/oshi exists on the new host
  • The oshi repository is cloned at this location
  • The directory is writable by the oshi user

The kstat debug commands (lines 100-102) are well-guarded with error fallbacks and will help diagnose Solaris-specific issues without breaking the build.


108-108: Clarify -Doshi.os.solaris.allowkstat2=false and confirm -pl oshi-common,oshi-core covers Solaris

  • oshi.os.solaris.allowkstat2 is defined in oshi-common (GlobalConfig.OSHI_OS_SOLARIS_ALLOWKSTAT2) with documented behavior: it gates using the Solaris 11.4+ kstat2 API; setting it to false forces the original kstat API (to avoid the documented file-descriptor leak risk under parallel GC).
  • That key is consumed by oshi-core (SolarisOperatingSystem sets ALLOW_KSTAT2 and HAS_KSTAT2), so the workflow flag directly changes which Solaris backend is used by the Solaris classes/tests.
  • Solaris-specific implementation and tests reside in oshi-core (with the config key in oshi-common), and other modules don’t appear to contain Solaris/kstat2 code paths, so restricting -pl to oshi-common,oshi-core shouldn’t skip relevant Solaris coverage.
  • Retry loop {1..2} matches the “retries flaky test once” comment.

Comment thread .github/workflows/unix.yaml Resolved
Comment on lines 168 to 170
logger.info("Checking Printers... ({}ms)", System.currentTimeMillis() - t);
t = System.currentTimeMillis();
printPrinters(lines, hal.getPrinters());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistency: Final section timing is never reported.

After logging "Checking Printers... ({}ms)" at line 168 (which actually times the Graphics Cards section due to the off-by-one issue), the timer is reset at line 169 but the elapsed time for printPrinters is never logged. This creates an inconsistency—all other sections have their timing reported (albeit with incorrect labels), but the final section's duration is silently discarded.

Additionally, once the off-by-one issue from lines 78-90 is fixed, ensure the final section timing is also logged.

🤖 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 `@oshi-core/src/test/java/oshi/SystemInfoTest.java` around lines 168 - 170, The
timer for the final section is never logged: after resetting t and calling
printPrinters(lines, hal.getPrinters()) you must compute the elapsed time using
t and log it via logger.info with an appropriate label (e.g., "Checking
Printers... ({}ms)"); ensure you reference the same variable t and the call
printPrinters(lines, hal.getPrinters()) so the duration is measured and logged,
and once you apply the earlier off-by-one fix to the preceding sections also
make sure this final timing remains consistent with the other logger.info calls.

- Replace gcc211 (Solaris 11.3, JDK 11) with cfarm216 (Solaris 11.4, JDK 17)
- Only test oshi-common,oshi-core (skip ffm/benchmark/metrics)
- Disable kstat2 on cfarm216 (CPU ticks issue on LDOM, see #3066)
- Use localOnly in SystemInfoHelper.printFileSystem debug output
- Upgrade OpenBSD from JDK 21 to JDK 25
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.

OpenBSD Tests failing on 7.8 (JNA related)

1 participant