Skip to content

Commit b250300

Browse files
authored
Migrate to a new S3 bucket (#1089)
Since: * We want the S3 bucket to be owned by a different AWS account and it's not possible to transfer ownership of an existing bucket. * In the future we want to rebuild some of the Python runtime archives (for example to improve the sqlite3 handling, or to tweak the compile flags used), and it will be easier to reason about the change if we can guarantee only recent buildpack versions are using the assets rather than several year old unmaintained forks. The assets were synced from the old bucket using (minus the `--dryrun`): ``` aws s3 sync s3://lang-python s3://heroku-buildpack-python \ --dryrun \ --metadata-directive REPLACE \ --exclude "*" \ --include 'common/*' \ --include 'heroku-*/runtimes/*' \ --include 'heroku-*/libraries/vendor/gdal.tar.gz' \ --include 'heroku-*/libraries/vendor/geos.tar.gz' \ --include 'heroku-*/libraries/vendor/proj.tar.gz' \ --exclude 'common/pip-20.0.2-py2.py3-none-any.whl' \ --exclude '*/runtimes/*-opt.tar.gz' \ --exclude '*/runtimes/sqlite-free/*' ``` The files that were `--exclude`d are those that are no longer used, or test assets that were not officially released. The Cedar-14 assets were not migrated since it's EOL next month. The old S3 bucket will be left untouched for the foreseeable future (ie: we won't be deleting it), since builds using older versions of this buildpack (either due to pinning to a tag or via a fork) will still be using assets from it. Closes @W-8060097@.
1 parent 096709d commit b250300

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Migrate from the `lang-python` S3 bucket to `heroku-buildpack-python` (#1089).
56
- Remove `vendor/shunit2` (#1086).
67
- Replace `BUILDPACK_VENDOR_URL` and `USE_STAGING_BINARIES` with `BUILDPACK_S3_BASE_URL` (#1085).
78

bin/compile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ export BUILD_DIR CACHE_DIR ENV_DIR
4141
# The user can provide BUILDPACK_S3_BASE_URL to specify a custom target.
4242
# Note: this is designed for non-Heroku use, as it does not use the user-provided
4343
# environment variable mechanism (the ENV_DIR).
44-
DEFAULT_S3_BASE_URL='https://lang-python.s3.amazonaws.com'
44+
if [[ "${STACK}" == "cedar-14" ]]; then
45+
# Since Cedar-14 is EOL on 2020-11-02 it's not worth migrating it to the new bucket.
46+
DEFAULT_S3_BASE_URL='https://lang-python.s3.amazonaws.com'
47+
else
48+
DEFAULT_S3_BASE_URL='https://heroku-buildpack-python.s3.amazonaws.com'
49+
fi
4550
S3_BASE_URL="${BUILDPACK_S3_BASE_URL:-${DEFAULT_S3_BASE_URL}}"
4651
# This has to be exported since it's used by the geo-libs step which is run in a subshell.
4752
# TODO: Stop exporting once the geo-libs step is removed or no longer uses `sub_env`.

builds/heroku-16.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM heroku/heroku:16-build
22

33
ENV WORKSPACE_DIR="/app/builds" \
4-
S3_BUCKET="lang-python" \
4+
S3_BUCKET="heroku-buildpack-python" \
55
S3_PREFIX="heroku-16/" \
66
STACK="heroku-16"
77

builds/heroku-18.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM heroku/heroku:18-build
22

33
ENV WORKSPACE_DIR="/app/builds" \
4-
S3_BUCKET="lang-python" \
4+
S3_BUCKET="heroku-buildpack-python" \
55
S3_PREFIX="heroku-18/" \
66
STACK="heroku-18"
77

0 commit comments

Comments
 (0)