diff --git a/CHANGELOG.md b/CHANGELOG.md index fa0148793..9678d7362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,33 @@ ## [Unreleased] +## [v287] - 2024-12-25 + +- Ruby 3.4.0 is now available (https://github.com/heroku/heroku-buildpack-ruby/pull/1531) +- Ruby 3.4.1 is now available (https://github.com/heroku/heroku-buildpack-ruby/pull/1531) + +## [v286] - 2024-12-13 + +- Ruby 3.4.0-rc1 is now available (https://github.com/heroku/heroku-buildpack-ruby/pull/1528) + +## [v285] - 2024-11-21 + +- Default `UV_USE_IO_URING=0` due to build timeouts [context](https://github.com/heroku/heroku-buildpack-nodejs/pull/1347) (https://github.com/heroku/heroku-buildpack-ruby/pull/1523) + +## [v284] - 2024-11-15 + +- Default Node.js version now 22.11.0 (https://github.com/heroku/heroku-buildpack-ruby/pull/1503) +- Default Yarn version now 1.22.22 (https://github.com/heroku/heroku-buildpack-ruby/pull/1503) + +## [v283] - 2024-11-14 + +- No customer facing changes + +## [v282] - 2024-11-08 + +- [Rolled back] Default Node.js version now 22.11.0 (https://github.com/heroku/heroku-buildpack-ruby/pull/1503) +- [Rolled back] Default Yarn version now 1.22.22 (https://github.com/heroku/heroku-buildpack-ruby/pull/1503) + ## [v281] - 2024-11-07 - Ruby 3.3.6 is now available (https://github.com/heroku/heroku-buildpack-ruby/pull/1511) @@ -1584,7 +1611,13 @@ Bugfixes: * Change gem detection to use lockfile parser * use `$RACK_ENV` when thin is detected for rack apps -[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v281...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v287...main +[v287]: https://github.com/heroku/heroku-buildpack-ruby/compare/v286...v287 +[v286]: https://github.com/heroku/heroku-buildpack-ruby/compare/v285...v286 +[v285]: https://github.com/heroku/heroku-buildpack-ruby/compare/v284...v285 +[v284]: https://github.com/heroku/heroku-buildpack-ruby/compare/v283...v284 +[v283]: https://github.com/heroku/heroku-buildpack-ruby/compare/v282...v283 +[v282]: https://github.com/heroku/heroku-buildpack-ruby/compare/v281...v282 [v281]: https://github.com/heroku/heroku-buildpack-ruby/compare/v280...v281 [v280]: https://github.com/heroku/heroku-buildpack-ruby/compare/v279...v280 [v279]: https://github.com/heroku/heroku-buildpack-ruby/compare/v278...v279 diff --git a/Gemfile.lock b/Gemfile.lock index 5c0085fa5..86917b001 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,8 @@ GEM remote: https://rubygems.org/ specs: base64 (0.2.0) - ci-queue (0.55.0) + ci-queue (0.59.0) + logger citrus (3.0.2) connection_pool (2.4.1) dead_end (4.0.0) @@ -23,6 +24,7 @@ GEM thor (~> 1) threaded (~> 0) json (2.7.2) + logger (1.6.2) moneta (1.0.0) multi_json (1.15.0) parallel (1.25.1) @@ -34,7 +36,7 @@ GEM rate_throttle_client (~> 0.1.0) rake (13.2.1) rate_throttle_client (0.1.2) - redis (5.2.0) + redis (5.3.0) redis-client (>= 0.22.0) redis-client (0.22.2) connection_pool diff --git a/app.json b/app.json index f0c801d15..514ddad23 100644 --- a/app.json +++ b/app.json @@ -20,7 +20,7 @@ }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", - "test": "bundle exec rspec-queue --max-requeues=3 --timeout 180 --queue $REDIS_URL || { cat log/test_order.log; $(exit 1); }" + "test": "bundle exec rspec-queue --max-requeues=3 --timeout 180 --queue $REDIS_URL --format documentation || { cat log/test_order.log; $(exit 1); }" }, "buildpacks": [ { diff --git a/changelogs/v284/node-yarn.md b/changelogs/v284/node-yarn.md new file mode 100644 index 000000000..b469a66de --- /dev/null +++ b/changelogs/v284/node-yarn.md @@ -0,0 +1,8 @@ +## Ruby apps now default to Node version 22.11.0 and Yarn version 1.22.22 + +Applications using the `heroku/ruby` buildpack that do not have a version of Node installed by another buildpack (such as the `heroku/nodejs` buildpack) will now receive: + +- Node version 22.11.0 +- Yarn version 1.22.22 + +These versions and instructions on how to specify a specific version of these binaries can be found on the [installed binaries section of the Heroku Ruby Support page](https://devcenter.heroku.com/articles/ruby-support#installed-binaries). diff --git a/changelogs/v286/3.4.0-rc1.md b/changelogs/v286/3.4.0-rc1.md new file mode 100644 index 000000000..c26eed3c8 --- /dev/null +++ b/changelogs/v286/3.4.0-rc1.md @@ -0,0 +1,15 @@ +## Ruby version 3.4.0-rc1 is now available + +[Ruby v3.4.0-rc1](/articles/ruby-support-reference#ruby-versions) is now available on Heroku. To run your app using this version of Ruby, add the following `ruby` directive to your Gemfile: + +```ruby +ruby "3.4.0.rc1" +``` + +For more information on [Ruby 3.4.0-rc1, you can view the release announcement](https://www.ruby-lang.org/en/news/). + +> Note +> This version of Ruby is not suitable for production applications. +> However, it can be used to test that your application is ready for +> the official release of Ruby 3.4.0 and +> to provide feedback to the Ruby core team. diff --git a/changelogs/v287/ruby_3.4.0.md b/changelogs/v287/ruby_3.4.0.md new file mode 100644 index 000000000..b63ee6503 --- /dev/null +++ b/changelogs/v287/ruby_3.4.0.md @@ -0,0 +1,9 @@ +## Ruby version 3.4.0 is now available + +[Ruby v3.4.0](/articles/ruby-support-reference#ruby-versions) is now available on Heroku. To run your app using this version of Ruby, add the following `ruby` directive to your Gemfile: + +```ruby +ruby "3.4.0" +``` + +For more information on [Ruby 3.4.0, you can view the release announcement](https://www.ruby-lang.org/en/news/). diff --git a/lib/language_pack/fetcher.rb b/lib/language_pack/fetcher.rb index 47efef863..b814c9f7f 100644 --- a/lib/language_pack/fetcher.rb +++ b/lib/language_pack/fetcher.rb @@ -26,9 +26,10 @@ def fetch(path) run!(curl, error_class: FetchError) end - def fetch_untar(path, files_to_extract = nil) + def fetch_untar(path, files_to_extract = nil, strip_components: 0) curl = curl_command("#{@host_url.join(path)} -s -o") - run! "#{curl} - | tar zxf - #{files_to_extract}", + tar_cmd = ["tar zxf - #{files_to_extract}", "--strip #{strip_components}"] + run! "#{curl} - | #{tar_cmd.join(" ")}", error_class: FetchError, max_attempts: 3 end diff --git a/lib/language_pack/helpers/nodebin.rb b/lib/language_pack/helpers/nodebin.rb index 7632e8366..c71398658 100644 --- a/lib/language_pack/helpers/nodebin.rb +++ b/lib/language_pack/helpers/nodebin.rb @@ -1,8 +1,8 @@ require 'json' class LanguagePack::Helpers::Nodebin - NODE_VERSION = "20.9.0" - YARN_VERSION = "1.22.19" + NODE_VERSION = "22.11.0" + YARN_VERSION = "1.22.22" def self.hardcoded_node_lts(arch: ) arch = "x64" if arch == "amd64" diff --git a/lib/language_pack/helpers/yarn_installer.rb b/lib/language_pack/helpers/yarn_installer.rb index 49a4e777c..2aae36f2a 100644 --- a/lib/language_pack/helpers/yarn_installer.rb +++ b/lib/language_pack/helpers/yarn_installer.rb @@ -21,10 +21,10 @@ def binary_path def install Dir.mktmpdir do |dir| Dir.chdir(dir) do - @fetcher.fetch_untar(@url) + @fetcher.fetch_untar(@url, strip_components: 1) end - FileUtils.mv(File.join(dir, name), name) + FileUtils.cp_r(dir, name) end end end diff --git a/lib/language_pack/ruby.rb b/lib/language_pack/ruby.rb index 4eec31704..18149c903 100644 --- a/lib/language_pack/ruby.rb +++ b/lib/language_pack/ruby.rb @@ -973,6 +973,11 @@ def add_node_js_binary version = @node_installer.version old_version = @metadata.fetch("default_node_version") { version } + # Make available for `rake assets:precompile` and other sub-shells + ENV["UV_USE_IO_URING"] ||= "0" + # Make available to future buildpacks (export), but not runtime (profile.d) + set_export_default "UV_USE_IO_URING", "0" + if version != version warn(<<~WARNING, inline: true) Default version of Node.js changed (#{old_version} to #{version}) @@ -1006,6 +1011,11 @@ def add_yarn_binary version = @yarn_installer.version old_version = @metadata.fetch("default_yarn_version") { version } + # Make available for `rake assets:precompile` and other sub-shells + ENV["UV_USE_IO_URING"] ||= "0" + # Make available to future buildpacks (export), but not runtime (profile.d) + set_export_default "UV_USE_IO_URING", "0" + if version != version warn(<<~WARNING, inline: true) Default version of Yarn changed (#{old_version} to #{version}) diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 82778b71b..1143c73e1 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v281" + BUILDPACK_VERSION = "v287" end end diff --git a/spec/hatchet/rubies_spec.rb b/spec/hatchet/rubies_spec.rb index 22e029111..55e7c23b0 100644 --- a/spec/hatchet/rubies_spec.rb +++ b/spec/hatchet/rubies_spec.rb @@ -13,15 +13,16 @@ end describe "Ruby versions" do - it "should deploy jdk on heroku-20" do - Hatchet::Runner.new("default_ruby", stack: "heroku-20").tap do |app| + it "should deploy jdk on heroku-24" do + Hatchet::Runner.new("default_ruby", stack: "heroku-24").tap do |app| app.before_deploy do |app| Pathname("Gemfile.lock").write(<<~EOM) GEM remote: https://rubygems.org/ specs: - rack (2.2.2) - rake (13.0.1) + rack (3.1.8) + rake (13.2.1) + webrick (1.9.1) PLATFORMS java @@ -29,10 +30,13 @@ DEPENDENCIES rack rake - + webrick RUBY VERSION - ruby 2.5.7p0 (jruby 9.2.13.0) + ruby 3.1.4p0 (jruby 9.4.8.0) + + BUNDLED WITH + 2.5.23 EOM Pathname("Rakefile").write(<<~'EOM') @@ -50,7 +54,7 @@ app.push! expect(app.output).to match("JRUBY_OPTS is: --dev") - expect(app.run("ls .jdk/jre/lib/ext/")).to match("pgconfig.jar") + expect(app.run("ruby -v")).to match("jruby") end end end