From 8d656c6d623b8b746b4f1575570e3f3d588f8c54 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Fri, 8 Nov 2024 12:03:55 -0600 Subject: [PATCH 1/9] Update Node.js default to 22.11.0 (#1503) * Update Node.js default to 22.11.0 * Update changelog for Node.js defaults * Add missing dot! Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Node yarn changelog for #1503 (#1514) --------- Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> Co-authored-by: Richard Schneeman --- CHANGELOG.md | 2 ++ changelogs/unreleased/node-yarn.md | 8 ++++++++ lib/language_pack/helpers/nodebin.rb | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelogs/unreleased/node-yarn.md diff --git a/CHANGELOG.md b/CHANGELOG.md index fa0148793..408c95ec5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- 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) ## [v281] - 2024-11-07 diff --git a/changelogs/unreleased/node-yarn.md b/changelogs/unreleased/node-yarn.md new file mode 100644 index 000000000..b469a66de --- /dev/null +++ b/changelogs/unreleased/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/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" From e791d739b74bcb47401e4d74dcaf615559b4d887 Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 18:10:12 +0000 Subject: [PATCH 2/9] Prepare release v282 (#1515) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 6 +++++- changelogs/{unreleased => v282}/node-yarn.md | 0 lib/language_pack/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) rename changelogs/{unreleased => v282}/node-yarn.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 408c95ec5..d90f3dec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [v282] - 2024-11-08 + - 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) @@ -1586,7 +1589,8 @@ 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/v282...main +[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/changelogs/unreleased/node-yarn.md b/changelogs/v282/node-yarn.md similarity index 100% rename from changelogs/unreleased/node-yarn.md rename to changelogs/v282/node-yarn.md diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 82778b71b..68b4135c2 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 = "v282" end end From adc448458d8dcd334893f05db4d939873382637f Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Mon, 11 Nov 2024 17:21:21 -0600 Subject: [PATCH 3/9] Roll back node & yarn updates (#1518) There's an issue with the way that yarn is packaged that caused #1516 due to behavior introduced in #1503. This commit reverts to the old node/yarn versions until we can fix the underlying bug. --- CHANGELOG.md | 4 ++-- lib/language_pack/helpers/nodebin.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d90f3dec3..eb4119a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,8 @@ ## [v282] - 2024-11-08 -- 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) +- [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 diff --git a/lib/language_pack/helpers/nodebin.rb b/lib/language_pack/helpers/nodebin.rb index c71398658..7632e8366 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 = "22.11.0" - YARN_VERSION = "1.22.22" + NODE_VERSION = "20.9.0" + YARN_VERSION = "1.22.19" def self.hardcoded_node_lts(arch: ) arch = "x64" if arch == "amd64" From a3f4f66c97a359921cd6820b1d30037744e883e2 Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Wed, 13 Nov 2024 09:11:46 -0600 Subject: [PATCH 4/9] Fix tests not executing (#1517) * Emit log order Issue #1505 spells out a problem where it appears ci-queue does not fail even when the test suite is broken. I'm unsure why this happens. To debug I'm emitting the tests that run so I can audit to make sure `rspec ./spec/helpers/yarn_installer_spec.rb:6` is executed. If it's not, then I need to diagnose why. If it is, then perhaps there some ordering bug that's affecting the outcome. * Update CI-queue * Update redis version * Use branch of ci-queue --- Gemfile | 2 +- Gemfile.lock | 14 +++++++++++--- app.json | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index c887ccc55..593368af1 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ group :development, :test do gem "parallel_tests" gem 'rspec-retry' gem 'json' - gem 'ci-queue' + gem 'ci-queue', github: "schneems/ci-queue", branch: "schneems/allow-hosted-redis" gem 'redis' gem 'dead_end' end diff --git a/Gemfile.lock b/Gemfile.lock index 5c0085fa5..41807c869 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,15 @@ +GIT + remote: https://github.com/schneems/ci-queue.git + revision: 285353ba8bc58e1b2ed02dedf55730400c27e32b + branch: schneems/allow-hosted-redis + specs: + ci-queue (0.58.0) + logger + GEM remote: https://rubygems.org/ specs: base64 (0.2.0) - ci-queue (0.55.0) citrus (3.0.2) connection_pool (2.4.1) dead_end (4.0.0) @@ -23,6 +30,7 @@ GEM thor (~> 1) threaded (~> 0) json (2.7.2) + logger (1.6.1) moneta (1.0.0) multi_json (1.15.0) parallel (1.25.1) @@ -34,7 +42,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 @@ -57,7 +65,7 @@ PLATFORMS ruby DEPENDENCIES - ci-queue + ci-queue! dead_end excon heroku_hatchet 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": [ { From 55ee089e506578847c76e85fd2dea86c0b47aaa5 Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Thu, 14 Nov 2024 09:49:05 -0600 Subject: [PATCH 5/9] Fix failure installing yarn 1.22.22 (#1519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix failure installing yarn 1.22.22 In #1516 there were reported build failures: ``` remote: -----> Installing node-v22.11.0-linux-x64 remote: -----> Installing yarn-v1.22.22 remote: remote: ! remote: ! No such file or directory @ rb_file_s_rename - (/tmp/d20241108-1032-vggdc3/yarn-v1.22.22, yarn-v1.22.22) remote: ! remote: /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:541:in `rename': No such file or directory @ rb_file_s_rename - (/tmp/d20241108-1032-vggdc3/yarn-v1.22.22, yarn-v1.22.22) (Errno::ENOENT) remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:541:in `block in mv' remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:1577:in `block in fu_each_src_dest' remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:1593:in `fu_each_src_dest0' remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:1575:in `fu_each_src_dest' remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/fileutils.rb:532:in `mv' remote: from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/yarn_installer.rb:27:in `block in install' remote: from /tmp/tmp.l8hWafbPfJ/lib/ruby/3.1.0/tmpdir.rb:96:in `mktmpdir' ``` This is because older versions of the yarn package have a top level directory that looks like this: ``` yarn-v1.22.19/ ``` But yarn 1.22.22 has a directory named "package" instead: ``` package/ ``` To work around this naming issue we can use `--strip 1` tar flag to remove the top level directory. From gnutar manfiles https://www.gnu.org/software/tar/manual/tar.html: ``` ‘--strip-components=number’ Strip given number of leading components from file names before extraction. For example, suppose you have archived whole ‘/usr’ hierarchy to a tar archive named ‘usr.tar’. Among other files, this archive contains ‘usr/include/stdlib.h’, which you wish to extract to the current working directory. To do so, you type: $ tar -xf usr.tar --strip=2 usr/include/stdlib.h The option ‘--strip=2’ instructs tar to strip the two leading components (‘usr/’ and ‘include/’) off the file name. If you add the ‘--verbose’ (‘-v’) option to the invocation above, you will note that the verbose listing still contains the full file name, with the two removed components still in place. This can be inconvenient, so tar provides a special option for altering this behavior: ``` * Default to strip 0 instead of true From the feedback: > Minor - maybe the default for strip_components should be 0 instead of false? From this signature, I would expect that if I want it to strip components I would pass true instead of false but that would produce an invalid command. --- CHANGELOG.md | 2 ++ changelogs/{v282 => unreleased}/node-yarn.md | 0 lib/language_pack/fetcher.rb | 5 +++-- lib/language_pack/helpers/yarn_installer.rb | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) rename changelogs/{v282 => unreleased}/node-yarn.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4119a51..ac6a6da7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- 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) ## [v282] - 2024-11-08 diff --git a/changelogs/v282/node-yarn.md b/changelogs/unreleased/node-yarn.md similarity index 100% rename from changelogs/v282/node-yarn.md rename to changelogs/unreleased/node-yarn.md diff --git a/lib/language_pack/fetcher.rb b/lib/language_pack/fetcher.rb index f16390720..d2a79c2e5 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/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 From 83a67ef1436f2bde87701d296b48a36e43cdadd0 Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:29:18 +0000 Subject: [PATCH 6/9] Prepare release v283 (#1520) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 6 +++++- changelogs/{unreleased => v283}/node-yarn.md | 0 lib/language_pack/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) rename changelogs/{unreleased => v283}/node-yarn.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6a6da7b..6cd7f3119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [v283] - 2024-11-14 + - 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) @@ -1591,7 +1594,8 @@ 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/v282...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v283...main +[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 diff --git a/changelogs/unreleased/node-yarn.md b/changelogs/v283/node-yarn.md similarity index 100% rename from changelogs/unreleased/node-yarn.md rename to changelogs/v283/node-yarn.md diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 68b4135c2..859857c01 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v282" + BUILDPACK_VERSION = "v283" end end From b17267f49cff2b62988c2446addb7b06057b8fae Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Fri, 15 Nov 2024 09:23:04 -0600 Subject: [PATCH 7/9] Re-apply Node 22.11.0 and yarn 1.22.22 defaults (#1521) --- CHANGELOG.md | 5 +++-- changelogs/{v283 => unreleased}/node-yarn.md | 0 lib/language_pack/helpers/nodebin.rb | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename changelogs/{v283 => unreleased}/node-yarn.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cd7f3119..f6327c70e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,12 @@ ## [Unreleased] +- 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 -- 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) +- No customer facing changes ## [v282] - 2024-11-08 diff --git a/changelogs/v283/node-yarn.md b/changelogs/unreleased/node-yarn.md similarity index 100% rename from changelogs/v283/node-yarn.md rename to changelogs/unreleased/node-yarn.md 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" From abd7281af5734358c2144cd5b4267af4728336b8 Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:35:15 +0000 Subject: [PATCH 8/9] Prepare release v284 (#1522) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 6 +++++- changelogs/{unreleased => v284}/node-yarn.md | 0 lib/language_pack/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) rename changelogs/{unreleased => v284}/node-yarn.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6327c70e..6a4ff2050 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [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) @@ -1595,7 +1598,8 @@ 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/v283...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v284...main +[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 diff --git a/changelogs/unreleased/node-yarn.md b/changelogs/v284/node-yarn.md similarity index 100% rename from changelogs/unreleased/node-yarn.md rename to changelogs/v284/node-yarn.md diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 859857c01..05ab999c2 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v283" + BUILDPACK_VERSION = "v284" end end From 8014748b9ebd1903270508edc91635c74b6cef06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Tue, 19 Nov 2024 12:10:37 +0100 Subject: [PATCH 9/9] chore: remove useless files --- .gitmodules | 0 VERSION | 1 - 2 files changed, 1 deletion(-) delete mode 100644 .gitmodules delete mode 100644 VERSION diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/VERSION b/VERSION deleted file mode 100644 index f0bb29e76..000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.3.0