From c5067b40511c13d4b358513be213b9055ecb2ac3 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 24 Aug 2025 12:39:17 +0200 Subject: [PATCH 1/3] CI: Add JRuby 10 testing Signed-off-by: Tim Meusel --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e1a38c52a7..2c65556313 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -48,6 +48,7 @@ jobs: - {os: ubuntu-24.04, ruby: '4.0'} - {os: ubuntu-24.04, ruby: 'jruby-9.4.8.0'} - {os: ubuntu-24.04, ruby: 'jruby-9.4.14.0'} + - {os: ubuntu-24.04, ruby: 'jruby-10.0.5.0'} - {os: windows-2025, ruby: '3.2'} - {os: windows-2025, ruby: '3.3'} - {os: windows-2025, ruby: '3.4'} From 1071d8c8f9e1b068ab1890566683a7b16a383e55 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 17 Apr 2026 12:25:04 +0200 Subject: [PATCH 2/3] CI: Install JRuby 10 w/ Java 21 & JRuby 9 w/ Java 17 Without Java 10, JRuby 10.0.5.0 gives us: ``` attempting to run with existing JAVA_HOME /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -jar /home/runner/.rubies/jruby-10.0.5.0/lib/jruby.jar --version Error: LinkageError occurred while loading main class org.jruby.main.Main java.lang.UnsupportedClassVersionError: org/jruby/main/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 JRuby failed to start, try Java 21 envs Setting JAVA_HOME to JAVA_HOME_21_X64 path /usr/lib/jvm/temurin-21-jdk-amd64 Adding /usr/lib/jvm/temurin-21-jdk-amd64/bin to PATH Took 0.24 seconds ``` Signed-off-by: Tim Meusel --- .github/workflows/tests.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2c65556313..74bc35e4c6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -58,7 +58,20 @@ jobs: steps: - name: Checkout current PR uses: actions/checkout@v6 - + # we explictly force Java 17 because that's the lowest one we support when building packages with ezbake + - name: Set up Java 17 for JRuby 9 + if: runner.os == 'Linux' && contains(matrix.cfg.ruby, 'jruby-9') + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '17' + # JRuby 10.0.5 requires java 21 or 25 + - name: Set up Java 21 for JRuby 10 + if: runner.os == 'Linux' && contains(matrix.cfg.ruby, 'jruby-10') + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' - name: Install ruby version ${{ matrix.cfg.ruby }} uses: ruby/setup-ruby@v1 with: From cf3b19539e0f33ce9f1fe37e78e6cfa2760f0d0f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 17 Apr 2026 14:36:50 +0200 Subject: [PATCH 3/3] CI: Ensure dummy fact is not empty An empty fact block triggers: ``` jruby -c .../modules/a_module/lib/facter/a_fact.rb RDoc is not a full Ruby parser and will fail when fed invalid ruby programs. ``` Signed-off-by: Tim Meusel --- spec/integration/util/rdoc/parser_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/integration/util/rdoc/parser_spec.rb b/spec/integration/util/rdoc/parser_spec.rb index 9894fa41db..9c82989ccd 100644 --- a/spec/integration/util/rdoc/parser_spec.rb +++ b/spec/integration/util/rdoc/parser_spec.rb @@ -92,6 +92,7 @@ module Puppet::Parser::Functions <<-EOF # The a_fact fact comment Puppet.runtime[:facter].add("a_fact") do + setcode { 'a_fact_value' } end EOF ],