From e27339d4a72697c595e45d18e8b0c3a2a0fb93b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Thu, 17 Jul 2025 11:41:09 -0700 Subject: [PATCH 1/8] Fix: update workflow configs to drop ruby 3.0 --- .github/workflows/buildpack-integration-test.yml | 4 ++-- .github/workflows/conformance.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/push-gh-pages.yml | 2 +- .github/workflows/unit.yml | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml index 744e729a..fb820f9f 100644 --- a/.github/workflows/buildpack-integration-test.yml +++ b/.github/workflows/buildpack-integration-test.yml @@ -23,5 +23,5 @@ jobs: cloudevent-builder-source: 'test/conformance' cloudevent-builder-target: 'cloudevent_func' prerun: ${{format('test/conformance/prerun.sh {0} testdata/conformance/function', github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha )}} - builder-runtime: 'ruby30' - builder-runtime-version: '3.0' + builder-runtime: 'ruby31' + builder-runtime-version: '3.1' diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index b51da325..270f4532 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ['3.0', '3.1', '3.2', '3.3'] + ruby: ['3.1', '3.2', '3.3'] steps: - name: Harden Runner uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 88dff617..fbfee0c8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,10 +28,10 @@ jobs: - name: Checkout repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install Ruby 3.0 + - name: Install Ruby 3.1 uses: ruby/setup-ruby@6c79f721fa26dd64559c2700086ac852c18e0756 # v1.225.0 with: - ruby-version: "3.0" + ruby-version: "3.1" bundler-cache: true - name: Install toys run: gem install --no-document toys diff --git a/.github/workflows/push-gh-pages.yml b/.github/workflows/push-gh-pages.yml index 975e38db..1daf8a44 100644 --- a/.github/workflows/push-gh-pages.yml +++ b/.github/workflows/push-gh-pages.yml @@ -10,7 +10,7 @@ permissions: read-all jobs: push-gh-pages: env: - ruby_version: "3.0" + ruby_version: "3.1" runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index b80d44bc..6a116cdf 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - ruby: ['3.0', '3.1', '3.2', '3.3'] + ruby: ['3.1', '3.2', '3.3'] flags: ["--only --test-unit"] include: - os: ubuntu-latest @@ -26,13 +26,13 @@ jobs: ruby: truffleruby flags: "--only --test-unit" - os: macos-latest - ruby: "3.0" + ruby: "3.1" flags: "--only --test-unit" - os: windows-latest - ruby: "3.0" + ruby: "3.1" flags: "--only --test-unit" - os: ubuntu-latest - ruby: "3.0" + ruby: "3.1" flags: "--only --test-yardoc --test-build --test-examples" fail-fast: false runs-on: ${{ matrix.os }} From 1ae2cd1d7f50c7768eb0e8c50d9b58e7b6b750e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Thu, 17 Jul 2025 11:45:46 -0700 Subject: [PATCH 2/8] fix test expected error message --- test/test_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_server.rb b/test/test_server.rb index 6f79f573..4406aa96 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -203,7 +203,7 @@ def query_server_with_retry server end assert_equal "400", response.code - assert_equal "unexpected token at 'not json'", response.body + assert_equal "unexpected token 'not' at line 1 column 1", response.body assert_equal "text/plain; charset=utf-8", response["Content-Type"] end From 43b23bf6a4022a34ab2e0ed278273ee92f0090cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Thu, 17 Jul 2025 11:52:25 -0700 Subject: [PATCH 3/8] fix test expected error message --- test/test_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_server.rb b/test/test_server.rb index 4406aa96..3fc0ab17 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -203,7 +203,7 @@ def query_server_with_retry server end assert_equal "400", response.code - assert_equal "unexpected token 'not' at line 1 column 1", response.body + assert_match /unexpected token/, response.body assert_equal "text/plain; charset=utf-8", response["Content-Type"] end From b4c9936c6f731675e973d6baa25ecd257f45941a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Thu, 17 Jul 2025 12:19:03 -0700 Subject: [PATCH 4/8] fix test expected error message --- test/test_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_server.rb b/test/test_server.rb index 3fc0ab17..01aee1d9 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -203,7 +203,7 @@ def query_server_with_retry server end assert_equal "400", response.code - assert_match /unexpected token/, response.body + assert_match "/unexpected token/", response.body assert_equal "text/plain; charset=utf-8", response["Content-Type"] end From c081e27afa1e2e93fb492772fcf8c442bc103673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Thu, 17 Jul 2025 12:24:19 -0700 Subject: [PATCH 5/8] fix test expected error message --- test/test_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_server.rb b/test/test_server.rb index 01aee1d9..78eb8aee 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -203,7 +203,7 @@ def query_server_with_retry server end assert_equal "400", response.code - assert_match "/unexpected token/", response.body + assert_match(/unexpected token/, response.body) assert_equal "text/plain; charset=utf-8", response["Content-Type"] end From 6b94681266561a25bffb3cec2defe782e97140bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Fri, 18 Jul 2025 10:59:37 -0700 Subject: [PATCH 6/8] add more ruby versions to windows test to see if they also fail --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 6a116cdf..64c65237 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -15,7 +15,7 @@ jobs: if: ${{ github.repository == 'GoogleCloudPlatform/functions-framework-ruby' }} strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] ruby: ['3.1', '3.2', '3.3'] flags: ["--only --test-unit"] include: From 4f44d1d13472adac9f90af0d233b0a0560273f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Fri, 18 Jul 2025 11:14:39 -0700 Subject: [PATCH 7/8] add ruby 3.4 to coverage, use 3.2 for windows unit tests --- .github/workflows/conformance.yml | 4 ++-- .github/workflows/unit.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 270f4532..316be076 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ['3.1', '3.2', '3.3'] + ruby: ['3.1', '3.2', '3.3', '3.4'] steps: - name: Harden Runner uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 @@ -71,4 +71,4 @@ jobs: useBuildpacks: false validateConcurrency: true cmd: "'bundle exec functions-framework-ruby --source test/conformance/app.rb --target concurrent_http_func --signature-type http'" - + diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 64c65237..f59aced4 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -15,8 +15,8 @@ jobs: if: ${{ github.repository == 'GoogleCloudPlatform/functions-framework-ruby' }} strategy: matrix: - os: [ubuntu-latest, windows-latest] - ruby: ['3.1', '3.2', '3.3'] + os: [ubuntu-latest] + ruby: ['3.1', '3.2', '3.3', '3.4'] flags: ["--only --test-unit"] include: - os: ubuntu-latest @@ -29,7 +29,7 @@ jobs: ruby: "3.1" flags: "--only --test-unit" - os: windows-latest - ruby: "3.1" + ruby: "3.2" # 3.1 fails similar to https://github.com/rubygems/rubygems/issues/4338 flags: "--only --test-unit" - os: ubuntu-latest ruby: "3.1" From 76cbda108e3fe264aa0669ec4b04f6c88fb4387a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kerekes?= Date: Fri, 18 Jul 2025 11:33:40 -0700 Subject: [PATCH 8/8] add 'gem base64' to gemfile --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 932edc0a..d0220dbe 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,7 @@ source "https://rubygems.org" gemspec +gem "base64" gem "google-style", "~> 1.30.1" gem "minitest", "~> 5.16" gem "minitest-focus", "~> 1.2"