Skip to content

Commit

Permalink
Fix build timeouts with node/yarn by setting UV_USE_IO_URING=0 by def…
Browse files Browse the repository at this point in the history
…ault (#1523)

* Set UV_USE_IO_URING=0 by default

Default `UV_USE_IO_URING=0` due to build timeouts This mirrors a change by the nodejs buildpack: heroku/heroku-buildpack-nodejs#1347

The Ruby buildpack needs this because we can install node/yarn without the `heroku/nodejs` buildpack, however this behavior triggers a warning and is generally advised against.

* Only set UV_USE_IO_URING=0 at build (not runtime)

* Make UV_USE_IO_URING=0 available for other buildpacks
  • Loading branch information
schneems authored Nov 21, 2024
1 parent abd7281 commit 8187b74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- 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

Expand Down
10 changes: 10 additions & 0 deletions lib/language_pack/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,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})
Expand Down Expand Up @@ -994,6 +999,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})
Expand Down

0 comments on commit 8187b74

Please sign in to comment.