Skip to content

Update test fixture after change in S3 bucket permissions#2048

Merged
edmorley merged 1 commit intomainfrom
update-test-403
Mar 4, 2026
Merged

Update test fixture after change in S3 bucket permissions#2048
edmorley merged 1 commit intomainfrom
update-test-403

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Mar 4, 2026

S3 directory listing permissions were removed from the buildpack's S3 bucket, which means non-existent files now return 403 rather than 404.

The implementation for error handling already works with both:

# We have to check for HTTP 403s too, since S3 will return a 403 instead of a 404 for
# missing files, if the S3 bucket does not have public list permissions enabled.
if [[ "${python_full_version}" != "${latest_known_patch_version}" ]] && grep --quiet "The requested URL returned error: 40[34]" "${error_log}"; then

However, the test assertion needs to be loosened to resolve this CI failure:
https://github.com/heroku/heroku-buildpack-python/actions/runs/22640940619/job/65680836050#step:5:497

GUS-W-21443369.

S3 directory listing permissions were removed from the buildpack's
S3 bucket, which means non-existent files now return 403 rather
than 404.

The implementation for error handling works with both:
https://github.com/heroku/heroku-buildpack-python/blob/855d7e66d99357f814f74a1e0920f6c0f377f64f/lib/python.sh#L74-L75

The test assertion has been loosened to make it less sensitive
to the exact curl output.

GUS-W-21443369.
@edmorley edmorley self-assigned this Mar 4, 2026
@edmorley edmorley marked this pull request as ready for review March 4, 2026 09:21
@edmorley edmorley requested a review from a team as a code owner March 4, 2026 09:21
@edmorley edmorley enabled auto-merge (squash) March 4, 2026 09:21
@edmorley edmorley merged commit 4f3aa88 into main Mar 4, 2026
6 of 7 checks passed
@edmorley edmorley deleted the update-test-403 branch March 4, 2026 09:41
@heroku-linguist heroku-linguist bot mentioned this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants