Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior around BASHBREW_LIBRARY in GHA #106

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

tianon
Copy link
Member

@tianon tianon commented Sep 30, 2024

This script needs/uses a custom BASHBREW_LIBRARY directory, but it stores that value in the exported environment slightly too soon such that generate-stackbrew-library.sh picks it up (and shouldn't be).

We often use "BASHBREW_LIBRARY is unset (or empty)" as a conditional for whether to fall back to using "https://github.com/docker-library/official-images/raw/HEAD/library/" as an explicit prefix for querying "source of truth" values for things like supported parent architectures.

These two things collided in docker-library/buildpack-deps@cc2dc88 (and similar commits) because the script saw BASHBREW_LIBRARY set, trusted it, but then fails to find the parent image.

This is the cleanest place to fix this such that generate-stackbrew-library.sh can take BASHBREW_LIBRARY from the provided environment instead of using our generated value.

@tianon tianon requested a review from yosifkit as a code owner September 30, 2024 18:40
@tianon
Copy link
Member Author

tianon commented Sep 30, 2024

We often use "BASHBREW_LIBRARY is unset (or empty)" as a conditional for whether to fall back to using "https://github.com/docker-library/official-images/raw/HEAD/library/" as an explicit prefix for querying "source of truth" values for things like supported parent architectures.

See https://github.com/docker-library/docs/blob/bb2429cba3b5a788647ad3c84d6c183d7e1afdd9/.template-helpers/arches.sh#L11-L14 for a pre-existing example of this precedent.

This script needs/uses a custom `BASHBREW_LIBRARY` directory, but it stores that value in the exported environment slightly too soon such that `generate-stackbrew-library.sh` picks it up (and shouldn't be).

We often use "`BASHBREW_LIBRARY` is unset (or empty)" as a conditional for whether to fall back to using "https://github.com/docker-library/official-images/raw/HEAD/library/" as an explicit prefix for querying "source of truth" values for things like supported parent architectures.

These two things collided in docker-library/buildpack-deps@cc2dc88 (and similar commits) because the script saw `BASHBREW_LIBRARY` set, trusted it, but then fails to find the parent image.

This is the cleanest place to fix this such that `generate-stackbrew-library.sh` can take `BASHBREW_LIBRARY` from the provided environment instead of using our generated value.
@yosifkit yosifkit merged commit b0b055e into docker-library:master Sep 30, 2024
6 checks passed
@yosifkit yosifkit deleted the BASHBREW_LIBRARY branch September 30, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants