Skip to content

Commit e54976e

Browse files
authored
Switch to AWS' dual-stack S3 URLs (heroku#1717)
The default AWS S3 URLs only support IPv4, whereas the dual-stack URLs support both IPv4 and IPv6: https://docs.aws.amazon.com/AmazonS3/latest/API/ipv6-access.html https://docs.aws.amazon.com/AmazonS3/latest/API/dual-stack-endpoints.html By switching to the dual-stack URLs, it means systems that support IPv6 will now use it instead of IPv4, which is helpful in IPv6 environments where IPv4 traffic has to fall back to being routed via NAT gateways (which has performance and ingress cost implications). See also: https://salesforce-internal.slack.com/archives/C01R6FJ738U/p1770827176094169 GUS-W-21341735.
1 parent 3ee0142 commit e54976e

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## [Unreleased]
44

5+
- Changed the S3 URLs used for downloads to use AWS' dual-stack (IPv6 compatible) endpoint. ([#1717](https://github.com/heroku/heroku-buildpack-ruby/pull/1717))
56
- Fix bug where an invalid DATABASE_URL is set when the adapter is not known (https://github.com/heroku/heroku-buildpack-ruby/pull/1715).
67

78
## [v347] - 2026-02-02
89

910
- JRuby 10.0.3.0 is now available
1011

11-
1212
## [v346] - 2026-02-02
1313

1414
- Add metric: Track apps with and without `BUNDLED WITH` in the `Gemfile.lock`

bin/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if detect_needs_java "$BUILD_DIR"; then
4242
EOM
4343

4444
build_data::kv_string "java_origin" "ruby_buildpack"
45-
compile_buildpack_v2 "$BUILD_DIR" "$CACHE_DIR" "$ENV_DIR" "https://buildpack-registry.s3.us-east-1.amazonaws.com/buildpacks/heroku/jvm.tgz" "heroku/jvm"
45+
compile_buildpack_v2 "$BUILD_DIR" "$CACHE_DIR" "$ENV_DIR" "https://buildpack-registry.s3.dualstack.us-east-1.amazonaws.com/buildpacks/heroku/jvm.tgz" "heroku/jvm"
4646
fi
4747

4848
"$bootstrap_ruby_dir"/bin/ruby "$BIN_DIR/support/ruby_compile.rb" "$@"

bin/support/bash_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ detect_needs_java()
5757
#
5858
# Example:
5959
#
60-
# compile_buildpack_v2 "$build_dir" "$cache_dir" "$env_dir" "https://buildpack-registry.s3.us-east-1.amazonaws.com/buildpacks/heroku/nodejs.tgz" "heroku/nodejs"
60+
# compile_buildpack_v2 "$build_dir" "$cache_dir" "$env_dir" "https://buildpack-registry.s3.dualstack.us-east-1.amazonaws.com/buildpacks/heroku/nodejs.tgz" "heroku/nodejs"
6161
#
6262
compile_buildpack_v2()
6363
{

bin/support/download_ruby

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ ruby_url() {
3232
if [ "$stack" == "heroku-24" ]; then
3333
local arch
3434
arch=$(dpkg --print-architecture)
35-
echo "${BUILDPACK_VENDOR_URL:-https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com}/$stack/$arch/ruby-$version.tgz"
35+
echo "${BUILDPACK_VENDOR_URL:-https://heroku-buildpack-ruby.s3.dualstack.us-east-1.amazonaws.com}/$stack/$arch/ruby-$version.tgz"
3636
else
37-
echo "${BUILDPACK_VENDOR_URL:-https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com}/$stack/ruby-$version.tgz"
37+
echo "${BUILDPACK_VENDOR_URL:-https://heroku-buildpack-ruby.s3.dualstack.us-east-1.amazonaws.com}/$stack/ruby-$version.tgz"
3838
fi
3939
}
4040

bin/test-compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if detect_needs_java "$BUILD_DIR"; then
3737
3838
EOM
3939

40-
compile_buildpack_v2 "$BUILD_DIR" "$CACHE_DIR" "$ENV_DIR" "https://buildpack-registry.s3.us-east-1.amazonaws.com/buildpacks/heroku/jvm.tgz" "heroku/jvm"
40+
compile_buildpack_v2 "$BUILD_DIR" "$CACHE_DIR" "$ENV_DIR" "https://buildpack-registry.s3.dualstack.us-east-1.amazonaws.com/buildpacks/heroku/jvm.tgz" "heroku/jvm"
4141
fi
4242

4343
"$bootstrap_ruby_dir"/bin/ruby "$BIN_DIR/support/ruby_test-compile.rb" "$@"

lib/language_pack/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class LanguagePack::Base
1515
include LanguagePack::ShellHelpers
1616
extend LanguagePack::ShellHelpers
1717

18-
VENDOR_URL = ENV["BUILDPACK_VENDOR_URL"] || "https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com"
18+
VENDOR_URL = ENV["BUILDPACK_VENDOR_URL"] || "https://heroku-buildpack-ruby.s3.dualstack.us-east-1.amazonaws.com"
1919
ROOT_DIR = File.expand_path("../../..", __FILE__)
2020
MULTI_ARCH_STACKS = ["heroku-24"]
2121
KNOWN_ARCHITECTURES = ["amd64", "arm64"]

lib/language_pack/helpers/nodebin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.hardcoded_node_lts(arch:)
1515
def self.hardcoded_yarn
1616
{
1717
"number" => YARN_VERSION,
18-
"url" => "https://heroku-nodebin.s3.us-east-1.amazonaws.com/yarn/release/yarn-v#{YARN_VERSION}.tar.gz"
18+
"url" => "https://heroku-nodebin.s3.dualstack.us-east-1.amazonaws.com/yarn/release/yarn-v#{YARN_VERSION}.tar.gz"
1919
}
2020
end
2121

lib/language_pack/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def install_binaries
566566

567567
# vendors individual binary into the slug
568568
# @param [String] name of the binary package from S3.
569-
# Example: https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/node-0.4.7.tgz, where name is "node-0.4.7"
569+
# Example: https://heroku-buildpack-ruby.s3.dualstack.us-east-1.amazonaws.com/node-0.4.7.tgz, where name is "node-0.4.7"
570570
def install_binary(name)
571571
topic "Installing #{name}"
572572
bin_dir = "bin"

0 commit comments

Comments
 (0)