From 877ddb99cf37b5218fce541b8735d4b4d9c61a44 Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Thu, 23 Oct 2025 22:07:56 -0400 Subject: [PATCH 1/2] Remove bionic stack support and Ruby 3.1 (EOL) Signed-off-by: Daniel Mikusa --- README.md | 4 +- buildpack.toml | 116 +----------------- dependency/actions/compile/README.md | 16 +-- dependency/actions/compile/bionic.Dockerfile | 17 --- dependency/retrieval/components/metadata.go | 19 --- .../retrieval/components/metadata_test.go | 31 ++--- dependency/retrieval/main.go | 4 +- dependency/test/bionic.Dockerfile | 11 -- dependency/test/test | 9 +- 9 files changed, 18 insertions(+), 209 deletions(-) delete mode 100644 dependency/actions/compile/bionic.Dockerfile delete mode 100644 dependency/test/bionic.Dockerfile diff --git a/README.md b/README.md index a8f3b97e..3f86f4b8 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,9 @@ $BP_LOG_LEVEL="DEBUG" ## Compatibility -This buildpack is currently only supported on the Paketo Bionic and Jammy stack +This buildpack is currently only supported on the Paketo Jammy stack distributions. Pre-compiled distributions of Ruby are provided for the Paketo stacks (i.e. -`io.buildpacks.stack.jammy` and `io.buildpacks.stacks.bionic`). +`io.buildpacks.stack.jammy`). Jammy stack support only applies to Ruby version 3.1 and above at this time. diff --git a/buildpack.toml b/buildpack.toml index 3b9dbef2..7ffa0d28 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -16,74 +16,7 @@ api = "0.7" include-files = ["bin/run", "bin/build", "bin/detect", "buildpack.toml"] pre-package = "./scripts/build.sh" [metadata.default-versions] - ruby = "3.1.*" - - [[metadata.dependencies]] - checksum = "sha256:2b41783bf4e4ccaed44498c05615f61455d556380b4fca641eba135832a2b063" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.6:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.1.6?checksum=0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz" - source-checksum = "sha256:0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22" - stacks = ["io.buildpacks.stacks.jammy"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.1.6_linux_x64_jammy_2b41783b.tgz" - version = "3.1.6" - - [[metadata.dependencies]] - checksum = "sha256:6d1e6b48e5de98f5fdcad5c06efc9a8f30c28bfe8e310918781f10ed531a4fe2" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.6:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.1.6?checksum=0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz" - source-checksum = "sha256:0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.1.6_linux_x64_bionic_6d1e6b48.tgz" - version = "3.1.6" - - [[metadata.dependencies]] - checksum = "sha256:560c7f9b0cddd6dad08c88cf1a69351ce3c3e37d5e7fc49b2005480b0591d3a3" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.7:*:*:*:*:*:*:*" - deprecation_date = "2025-03-26T00:00:00Z" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.1.7?checksum=0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz" - source-checksum = "sha256:0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.1.7_linux_x64_bionic_560c7f9b.tgz" - version = "3.1.7" - - [[metadata.dependencies]] - checksum = "sha256:5509eede794beecf08debbec26fc115005e6bc67ad523d07fae287d12fa7416e" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.7:*:*:*:*:*:*:*" - deprecation_date = "2025-03-26T00:00:00Z" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.1.7?checksum=0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz" - source-checksum = "sha256:0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b" - stacks = ["io.buildpacks.stacks.jammy"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.1.7_linux_x64_jammy_5509eede.tgz" - version = "3.1.7" - - [[metadata.dependencies]] - checksum = "sha256:5687f94f483f59a8ab47cf73c733202a1c31183d58096f6adb2570e8b3bbe2a8" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.8:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.2.8?checksum=77acdd8cfbbe1f8e573b5e6536e03c5103df989dc05fa68c70f011833c356075&download_url=https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz" - source-checksum = "sha256:77acdd8cfbbe1f8e573b5e6536e03c5103df989dc05fa68c70f011833c356075" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.2.8_linux_x64_bionic_5687f94f.tgz" - version = "3.2.8" + ruby = "3.4.*" [[metadata.dependencies]] checksum = "sha256:08fb3d66a578deb7c3cf428bb8d9e3f006adbb264b8c40f9693b2fec4c32c0a1" @@ -98,19 +31,6 @@ api = "0.7" uri = "https://artifacts.paketo.io/ruby/ruby_3.2.8_linux_x64_jammy_08fb3d66.tgz" version = "3.2.8" - [[metadata.dependencies]] - checksum = "sha256:5908cabd9e43e19ed784adb9655c665a6157bb90e51a0304442f339daab52afc" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.9:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.2.9?checksum=abbad98db9aeb152773b0d35868e50003b8c467f3d06152577c4dfed9d88ed2a&download_url=https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.9.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.9.tar.gz" - source-checksum = "sha256:abbad98db9aeb152773b0d35868e50003b8c467f3d06152577c4dfed9d88ed2a" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.2.9_linux_x64_bionic_5908cabd.tgz" - version = "3.2.9" - [[metadata.dependencies]] checksum = "sha256:d5684554cdf64b8348ddc06adde8e45d4783419383eae0f5e700a010a0567efb" cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.9:*:*:*:*:*:*:*" @@ -124,19 +44,6 @@ api = "0.7" uri = "https://artifacts.paketo.io/ruby/ruby_3.2.9_linux_x64_jammy_d5684554.tgz" version = "3.2.9" - [[metadata.dependencies]] - checksum = "sha256:70c9a062068d1a8329e796da756c7826a40c8f54d96edd20d8d6a2294397fb90" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.9:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.3.9?checksum=d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1&download_url=https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.9.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.9.tar.gz" - source-checksum = "sha256:d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.3.9_linux_x64_bionic_70c9a062.tgz" - version = "3.3.9" - [[metadata.dependencies]] checksum = "sha256:83b4192551fd2918491c0342e44b48dfae0c9f301a3fa1def6653d419a1a6758" cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.9:*:*:*:*:*:*:*" @@ -150,19 +57,6 @@ api = "0.7" uri = "https://artifacts.paketo.io/ruby/ruby_3.3.9_linux_x64_jammy_83b41925.tgz" version = "3.3.9" - [[metadata.dependencies]] - checksum = "sha256:9d4376f8ee14eb8074abd200f39e5634dc82876803fdaee122f9308639477802" - cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.10:*:*:*:*:*:*:*" - id = "ruby" - licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"] - name = "Ruby" - purl = "pkg:generic/ruby@3.3.10?checksum=b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928&download_url=https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.10.tar.gz" - source = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.10.tar.gz" - source-checksum = "sha256:b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928" - stacks = ["io.buildpacks.stacks.bionic"] - uri = "https://artifacts.paketo.io/ruby/ruby_3.3.10_linux_x64_bionic_9d4376f8.tgz" - version = "3.3.10" - [[metadata.dependencies]] checksum = "sha256:4b242e4caadbf9d118e51059c02783358ccfbd5680a013cd16bf10910946b370" cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.10:*:*:*:*:*:*:*" @@ -176,11 +70,6 @@ api = "0.7" uri = "https://artifacts.paketo.io/ruby/ruby_3.3.10_linux_x64_jammy_4b242e4c.tgz" version = "3.3.10" - [[metadata.dependency-constraints]] - constraint = "3.1.*" - id = "ruby" - patches = 2 - [[metadata.dependency-constraints]] constraint = "3.2.*" id = "ruby" @@ -196,8 +85,5 @@ api = "0.7" id = "ruby" patches = 2 -[[stacks]] - id = "io.buildpacks.stacks.bionic" - [[stacks]] id = "io.buildpacks.stacks.jammy" diff --git a/dependency/actions/compile/README.md b/dependency/actions/compile/README.md index ae81b1ea..c85e92bd 100644 --- a/dependency/actions/compile/README.md +++ b/dependency/actions/compile/README.md @@ -4,12 +4,7 @@ To compile ruby, follow the below steps. ### Build the dockerfile: ``` -docker build --tag bionic-compile --file .Dockerfile . -``` - -#### For Bionic: -``` -docker build --tag bionic-compile --file bionic.Dockerfile . +docker build --tag -compile --file .Dockerfile . ``` #### For Jammy: @@ -22,13 +17,8 @@ docker build --tag jammy-compile --file jammy.Dockerfile . docker run --volume $PWD:/tmp/compilation -compile --outputDir /tmp/compilation --target --version ``` -#### For Bionic: -``` -docker run --volume $PWD:/tmp/compilation bionic-compile --outputDir /tmp/compilation --target bionic --version -``` - #### For Jammy: -**Note** that only Ruby 3.1.0 and above are supported on Jammy + ``` -docker run --volume $PWD:/tmp/compilation jammy-compile --outputDir /tmp/compilation --target bionic --version +docker run --volume $PWD:/tmp/compilation jammy-compile --outputDir /tmp/compilation --target jammy --version ``` diff --git a/dependency/actions/compile/bionic.Dockerfile b/dependency/actions/compile/bionic.Dockerfile deleted file mode 100644 index 2d9a8e68..00000000 --- a/dependency/actions/compile/bionic.Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM paketobuildpacks/build-bionic-full - -ENV DEBIAN_FRONTEND noninteractive - -ARG cnb_uid=0 -ARG cnb_gid=0 - -USER ${cnb_uid}:${cnb_gid} - -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get -y install rustc && \ - rm -rf /var/lib/apt/lists/* /tmp/* /etc/apt/preferences - -COPY entrypoint /entrypoint - -ENTRYPOINT ["/entrypoint"] diff --git a/dependency/retrieval/components/metadata.go b/dependency/retrieval/components/metadata.go index b5857f92..93ead7ca 100644 --- a/dependency/retrieval/components/metadata.go +++ b/dependency/retrieval/components/metadata.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/Masterminds/semver" "github.com/paketo-buildpacks/packit/v2/cargo" ) @@ -27,9 +26,6 @@ type DeprecationDate interface { } // GenerateMetadata will generate Ruby dependency-specific metadata for each given target -// Note that `jammy` stack-related entries will only be generated when the -// version is 3.1 or greater, due to OpenSSL v3 incompatibilites with Ruby 3.0 -// and below. func GenerateMetadata(release RubyRelease, targets []string, licenseRetriever License, deprecationDate DeprecationDate) ([]Dependency, error) { dependencies := []Dependency{} licenses, err := licenseRetriever.LookupLicenses("ruby", release.URL.Gz) @@ -56,22 +52,7 @@ func GenerateMetadata(release RubyRelease, targets []string, licenseRetriever Li stacks := []string{} switch target { - case "bionic": - stacks = []string{"io.buildpacks.stacks.bionic"} case "jammy": - // If target==jammy and version <= 3.0.x, don't include it - version, err := semver.NewVersion(release.Version) - if err != nil { - return dependencies, err - } - constraint, err := semver.NewConstraint("< 3.1") - if err != nil { - //untested - return dependencies, err - } - if constraint.Check(version) { - continue - } stacks = []string{"io.buildpacks.stacks.jammy"} } diff --git a/dependency/retrieval/components/metadata_test.go b/dependency/retrieval/components/metadata_test.go index 94073f89..93bcd901 100644 --- a/dependency/retrieval/components/metadata_test.go +++ b/dependency/retrieval/components/metadata_test.go @@ -41,24 +41,9 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { it("retrieves all upstream releases", func() { time := time.Date(2022, time.Month(11), 01, 00, 00, 00, 00, time.UTC) - dependencies, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + dependencies, err := components.GenerateMetadata(release, []string{"jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(Not(HaveOccurred())) Expect(dependencies).To(Equal([]components.Dependency{ - components.Dependency{ - cargo.ConfigMetadataDependency{ - CPE: "cpe:2.3:a:ruby-lang:ruby:3.4.5:*:*:*:*:*:*:*", - DeprecationDate: &time, - PURL: "pkg:generic/ruby@3.4.5?checksum=some-ruby-sha&download_url=ruby-3.4.5-release.tar.gz", - ID: "ruby", - Name: "Ruby", - Licenses: []interface{}{"license-1"}, - Source: "ruby-3.4.5-release.tar.gz", - SourceChecksum: "sha256:some-ruby-sha", - Stacks: []string{"io.buildpacks.stacks.bionic"}, - Version: "3.4.5", - }, - "bionic", - }, components.Dependency{ cargo.ConfigMetadataDependency{ CPE: "cpe:2.3:a:ruby-lang:ruby:3.4.5:*:*:*:*:*:*:*", @@ -88,7 +73,7 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { it("excludes a jammy target entry", func() { time := time.Date(2022, time.Month(11), 01, 00, 00, 00, 00, time.UTC) - dependencies, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + dependencies, err := components.GenerateMetadata(release, []string{"other", "jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(Not(HaveOccurred())) Expect(dependencies).To(Equal([]components.Dependency{ components.Dependency{ @@ -101,10 +86,10 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { Licenses: []interface{}{"license-1"}, Source: "ruby-1.2.3-release.tar.gz", SourceChecksum: "sha256:some-ruby-sha", - Stacks: []string{"io.buildpacks.stacks.bionic"}, + Stacks: []string{"io.buildpacks.stacks.other"}, Version: "1.2.3", }, - "bionic", + "other", }, })) }) @@ -116,7 +101,7 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { licenseRetriever.LookupLicensesCall.Returns.Error = errors.New("failed to lookup licenses") }) it("returns an error", func() { - _, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + _, err := components.GenerateMetadata(release, []string{"jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(MatchError(ContainSubstring("failed to lookup licenses"))) }) }) @@ -126,7 +111,7 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { deprecationDateRetriever.GetDateCall.Returns.Error = errors.New("failed to get deprecationDate") }) it("returns an error", func() { - _, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + _, err := components.GenerateMetadata(release, []string{"jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(MatchError(ContainSubstring("failed to get deprecationDate"))) }) }) @@ -136,7 +121,7 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { deprecationDateRetriever.GetDateCall.Returns.String = "bad-time" }) it("returns an error", func() { - _, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + _, err := components.GenerateMetadata(release, []string{"jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(MatchError(ContainSubstring("invalid EOL date"))) }) }) @@ -150,7 +135,7 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { } }) it("returns an error", func() { - _, err := components.GenerateMetadata(release, []string{"bionic", "jammy"}, licenseRetriever, deprecationDateRetriever) + _, err := components.GenerateMetadata(release, []string{"jammy"}, licenseRetriever, deprecationDateRetriever) Expect(err).To(MatchError(ContainSubstring("Invalid Semantic Version"))) }) }) diff --git a/dependency/retrieval/main.go b/dependency/retrieval/main.go index 4ad53fe2..10f738ec 100644 --- a/dependency/retrieval/main.go +++ b/dependency/retrieval/main.go @@ -63,10 +63,10 @@ func main() { fail(err) } if !valid { - fail(errors.New(fmt.Sprintf("failed to validate dependency checksum for version %s", version))) + fail(fmt.Errorf("failed to validate dependency checksum for version %s", version)) } - entries, err := components.GenerateMetadata(upstreamVersionMap[version], []string{"jammy", "bionic"}, components.NewLicenseRetriever(), components.NewDeprecationDateRetriever()) + entries, err := components.GenerateMetadata(upstreamVersionMap[version], []string{"jammy"}, components.NewLicenseRetriever(), components.NewDeprecationDateRetriever()) if err != nil { fail(err) } diff --git a/dependency/test/bionic.Dockerfile b/dependency/test/bionic.Dockerfile deleted file mode 100644 index 59fbbd63..00000000 --- a/dependency/test/bionic.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:bionic - -RUN apt update && apt install -y curl - -COPY run.rb /test/run.rb - -COPY entrypoint /entrypoint - -ENTRYPOINT ["/entrypoint"] - -WORKDIR /test diff --git a/dependency/test/test b/dependency/test/test index 66ba785b..eee3a10c 100755 --- a/dependency/test/test +++ b/dependency/test/test @@ -38,17 +38,12 @@ main() { exit 1 fi - if [[ $(basename "${tarball_path}") == *"bionic"* ]]; then - echo "Running bionic test..." - docker build --tag test --file bionic.Dockerfile . - docker run --rm --volume "$(dirname -- "${tarball_path}"):/tarball_path" test --tarballPath "/tarball_path/$(basename "${tarball_path}")" --version "${version}" - - elif [[ $(basename -- "${tarball_path}") == *"jammy"* ]]; then + if [[ $(basename -- "${tarball_path}") == *"jammy"* ]]; then echo "Running jammy test..." docker build --tag test --file jammy.Dockerfile . docker run --rm --volume "$(dirname -- "${tarball_path}"):/tarball_path" test --tarballPath "/tarball_path/$(basename "${tarball_path}")" --version "${version}" else - echo "bionic or jammy not found - skipping tests" + echo "jammy not found - skipping tests" fi } From 6c09f98ee96085b69e60fe2f8981637d34b50acc Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Thu, 23 Oct 2025 22:51:08 -0400 Subject: [PATCH 2/2] Update tests that were using 3.1 to use 3.4 Signed-off-by: Daniel Mikusa --- README.md | 2 - dependency/actions/compile/entrypoint | 6 --- .../retrieval/components/metadata_test.go | 33 ---------------- integration/logging_test.go | 38 +++++++++---------- integration/offline_test.go | 2 +- integration/reuse_layer_rebuild_test.go | 28 +++++++------- integration/simple_app_test.go | 4 +- 7 files changed, 36 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 3f86f4b8..4f3ad880 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,6 @@ This buildpack is currently only supported on the Paketo Jammy stack distributions. Pre-compiled distributions of Ruby are provided for the Paketo stacks (i.e. `io.buildpacks.stack.jammy`). -Jammy stack support only applies to Ruby version 3.1 and above at this time. - ## Development Paketo buildpacks are going through an uniformization of the dev experience across buildpacks, diff --git a/dependency/actions/compile/entrypoint b/dependency/actions/compile/entrypoint index 07f46ac2..e2a0ffce 100755 --- a/dependency/actions/compile/entrypoint +++ b/dependency/actions/compile/entrypoint @@ -57,14 +57,8 @@ function main() { exit 1 fi - # Only Ruby versions >= 3.1.0 work on Jammy major=$(echo "${version%.*}" | cut -d '.' -f1) minor=$(echo "${version%.*}" | cut -d '.' -f2) - if [[ "${target}" == "jammy" ]] && [[ ${major} -lt 3 || (${major} -eq 3 && ${minor} -lt 1) ]]; then - echo "version ${version} cannot be compiled on jammy, only 3.1.0 and above" - exit 1 - fi - if [[ "${major}" -ge 3 ]] && [[ "${minor}" -ge 2 ]]; then configure_opts+=("--enable-yjit") fi diff --git a/dependency/retrieval/components/metadata_test.go b/dependency/retrieval/components/metadata_test.go index 93bcd901..446badde 100644 --- a/dependency/retrieval/components/metadata_test.go +++ b/dependency/retrieval/components/metadata_test.go @@ -62,39 +62,6 @@ func testMetadataGeneration(t *testing.T, context spec.G, it spec.S) { })) }) - context("the version is less than 3.1.*", func() { - it.Before(func() { - release = components.RubyRelease{ - Version: "1.2.3", - URL: components.URL{Gz: "ruby-1.2.3-release.tar.gz"}, - SHA256: components.SHA256{Gz: "some-ruby-sha"}, - } - }) - - it("excludes a jammy target entry", func() { - time := time.Date(2022, time.Month(11), 01, 00, 00, 00, 00, time.UTC) - dependencies, err := components.GenerateMetadata(release, []string{"other", "jammy"}, licenseRetriever, deprecationDateRetriever) - Expect(err).To(Not(HaveOccurred())) - Expect(dependencies).To(Equal([]components.Dependency{ - components.Dependency{ - cargo.ConfigMetadataDependency{ - CPE: "cpe:2.3:a:ruby-lang:ruby:1.2.3:*:*:*:*:*:*:*", - DeprecationDate: &time, - PURL: "pkg:generic/ruby@1.2.3?checksum=some-ruby-sha&download_url=ruby-1.2.3-release.tar.gz", - ID: "ruby", - Name: "Ruby", - Licenses: []interface{}{"license-1"}, - Source: "ruby-1.2.3-release.tar.gz", - SourceChecksum: "sha256:some-ruby-sha", - Stacks: []string{"io.buildpacks.stacks.other"}, - Version: "1.2.3", - }, - "other", - }, - })) - }) - }) - context("failure cases", func() { context("the license retriever returns an error", func() { it.Before(func() { diff --git a/integration/logging_test.go b/integration/logging_test.go index 5e1e3ae7..b8053e3e 100644 --- a/integration/logging_test.go +++ b/integration/logging_test.go @@ -59,7 +59,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.BuildPlan.Online, ). WithEnv(map[string]string{ - "BP_MRI_VERSION": "3.1.x", + "BP_MRI_VERSION": "3.4.x", }). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) @@ -68,29 +68,29 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " BP_MRI_VERSION -> \"3.1.x\"", + " BP_MRI_VERSION -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( " Executing build process", - MatchRegexp(` Installing MRI 3\.1\.\d+`), + MatchRegexp(` Installing MRI 3\.4\.\d+`), MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`), )) Expect(logs).To(ContainLines( " Configuring build environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) Expect(logs).To(ContainLines( " Configuring launch environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) }) @@ -109,7 +109,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.BuildPlan.Online, ). WithEnv(map[string]string{ - "BP_MRI_VERSION": "3.1.x", + "BP_MRI_VERSION": "3.4.x", "BP_LOG_LEVEL": "DEBUG", }). Execute(name, source) @@ -119,12 +119,12 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " BP_MRI_VERSION -> \"3.1.x\"", + " BP_MRI_VERSION -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( @@ -134,9 +134,9 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines( " Executing build process", - MatchRegexp(` Installing MRI 3\.1\.\d+`), + MatchRegexp(` Installing MRI 3\.4\.\d+`), fmt.Sprintf(" Installation path: /layers/%s/mri", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")), - MatchRegexp(` Source URI\: https\:\/\/\S+\/ruby\/ruby_3\.1\.\d+_linux_x64_*_.*\.tgz`), + MatchRegexp(` Source URI\: https\:\/\/\S+\/ruby\/ruby_3\.4\.\d+_linux_x64_*_.*\.tgz`), MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`), )) @@ -146,13 +146,13 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines( " Configuring build environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) Expect(logs).To(ContainLines( " Configuring launch environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) }) @@ -164,7 +164,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { source, err = occam.Source(filepath.Join("testdata", "simple_app")) Expect(err).NotTo(HaveOccurred()) - err = os.WriteFile(filepath.Join(source, "buildpack.yml"), []byte(`{ "mri": { "version": "3.1.x" } }`), 0600) + err = os.WriteFile(filepath.Join(source, "buildpack.yml"), []byte(`{ "mri": { "version": "3.4.x" } }`), 0600) Expect(err).NotTo(HaveOccurred()) var logs fmt.Stringer @@ -181,12 +181,12 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " buildpack.yml -> \"3.1.x\"", + " buildpack.yml -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using buildpack\.yml\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using buildpack\.yml\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( @@ -196,19 +196,19 @@ func testLogging(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines( " Executing build process", - MatchRegexp(` Installing MRI 3\.1\.\d+`), + MatchRegexp(` Installing MRI 3\.4\.\d+`), MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`), )) Expect(logs).To(ContainLines( " Configuring build environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) Expect(logs).To(ContainLines( " Configuring launch environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) }) diff --git a/integration/offline_test.go b/integration/offline_test.go index 93277bc9..7e0360e9 100644 --- a/integration/offline_test.go +++ b/integration/offline_test.go @@ -74,7 +74,7 @@ func testOffline(t *testing.T, context spec.G, it spec.S) { Expect(err).NotTo(HaveOccurred()) Eventually(container).Should(BeAvailable(), logs.String()) - Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.1\.\d+`)).OnPort(8080)) + Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.4\.\d+`)).OnPort(8080)) }) }) } diff --git a/integration/reuse_layer_rebuild_test.go b/integration/reuse_layer_rebuild_test.go index 6d456884..1045222b 100644 --- a/integration/reuse_layer_rebuild_test.go +++ b/integration/reuse_layer_rebuild_test.go @@ -74,7 +74,7 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.MRI.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_MRI_VERSION": "3.1.x"}) + WithEnv(map[string]string{"BP_MRI_VERSION": "3.4.x"}) firstImage, logs, err = build.Execute(name, source) Expect(err).NotTo(HaveOccurred(), logs.String) @@ -89,12 +89,12 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " BP_MRI_VERSION -> \"3.1.x\"", + " BP_MRI_VERSION -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( @@ -105,13 +105,13 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines( " Configuring build environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) Expect(logs).To(ContainLines( " Configuring launch environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) @@ -141,12 +141,12 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " BP_MRI_VERSION -> \"3.1.x\"", + " BP_MRI_VERSION -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( @@ -164,7 +164,7 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { containerIDs[secondContainer.ID] = struct{}{} Eventually(secondContainer).Should(BeAvailable()) - Eventually(secondContainer).Should(Serve(MatchRegexp(`Hello from Ruby 3\.1\.\d+`)).OnPort(8080)) + Eventually(secondContainer).Should(Serve(MatchRegexp(`Hello from Ruby 3\.4\.\d+`)).OnPort(8080)) Expect(secondImage.Buildpacks[0].Layers["mri"].SHA).To(Equal(firstImage.Buildpacks[0].Layers["mri"].SHA)) }) @@ -193,7 +193,7 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { ) firstImage, logs, err = build. - WithEnv(map[string]string{"BP_MRI_VERSION": "3.1.x"}). + WithEnv(map[string]string{"BP_MRI_VERSION": "3.4.x"}). Execute(name, source) Expect(err).NotTo(HaveOccurred(), logs.String) @@ -207,29 +207,29 @@ func testReusingLayerRebuild(t *testing.T, context spec.G, it spec.S) { MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)), " Resolving MRI version", " Candidate version sources (in priority order):", - " BP_MRI_VERSION -> \"3.1.x\"", + " BP_MRI_VERSION -> \"3.4.x\"", " -> \"\"", )) Expect(logs).To(ContainLines( - MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`), + MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.4\.\d+`), )) Expect(logs).To(ContainLines( " Executing build process", - MatchRegexp(` Installing MRI 3\.1\.\d+`), + MatchRegexp(` Installing MRI 3\.4\.\d+`), MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`), )) Expect(logs).To(ContainLines( " Configuring build environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) Expect(logs).To(ContainLines( " Configuring launch environment", - MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), + MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.4\.\d+:/layers/%s/mri/lib/ruby/gems/3\.4\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))), ` MALLOC_ARENA_MAX -> "2"`, )) diff --git a/integration/simple_app_test.go b/integration/simple_app_test.go index 620650d8..a2c81432 100644 --- a/integration/simple_app_test.go +++ b/integration/simple_app_test.go @@ -75,7 +75,7 @@ func testSimpleApp(t *testing.T, context spec.G, it spec.S) { Expect(err).NotTo(HaveOccurred()) Eventually(container).Should(BeAvailable(), logs.String()) - Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.1\.\d+`)).OnPort(8080)) + Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.4\.\d+`)).OnPort(8080)) }) context("validating SBOM", func() { @@ -122,7 +122,7 @@ func testSimpleApp(t *testing.T, context spec.G, it spec.S) { Expect(err).NotTo(HaveOccurred()) Eventually(container).Should(BeAvailable(), logs.String()) - Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.1\.\d+`)).OnPort(8080)) + Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.4\.\d+`)).OnPort(8080)) Expect(logs).To(ContainLines( fmt.Sprintf(" Generating SBOM for /layers/%s/mri", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),