Add build environment validation checks#1724
Merged
Merged
Conversation
schneems
reviewed
Dec 13, 2024
schneems
reviewed
Dec 13, 2024
- Adds a warning if the Python buildpack has been run multiple times in the same build. - Adds a warning if an existing `.heroku/python/` directory is found in the app source. - Improves the error message shown if the buildpack is used on an unsupported stack. Previously the build would fail with a curl download error depending on the availability of assets on S3. This scenario can only happen outside of Heroku, or in an old buildpack is used with a brand new stack (eg for Heroku-26). The two warnings are the first step towards #1704 and #1710, and will be turned into errors in January 2025. Towards #1704 and #1710. GUS-W-17386432. GUS-W-17309709.
schneems
approved these changes
Dec 13, 2024
schneems
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Reminds me of heroku/heroku-buildpack-ruby#552.
Merged
edmorley
added a commit
that referenced
this pull request
Jul 10, 2025
Builds will now error if either: - The Python buildpack has been run multiple times in the same build. - An existing `.heroku/python/` directory is found in the app source for any other reason (e.g. accidentally committed to Git) This upgrades the warnings added in #1724 in December 2024 to errors. Zero feedback/concerns were raised in the GitHub issue linked from the warning: #1704 And Honeycomb data shows: - the number of apps hitting the warnings was minimal - in most cases, the builds hitting the warnings were failing already (eg due to broken `python/` directories having been committed to Git, and so turning the warning into an error will actually give them a better error message than before). Closes #1704. GUS-W-17309720.
edmorley
added a commit
that referenced
this pull request
Jul 10, 2025
Builds will now error if either: - The Python buildpack has been run multiple times in the same build. - An existing `.heroku/python/` directory is found in the app source for any other reason (e.g. accidentally committed to Git) This upgrades the warnings added in #1724 in December 2024 to errors. Zero feedback/concerns were raised in the GitHub issue linked from the warning: #1704 And Honeycomb data shows: - the number of apps hitting the warnings was minimal - in most cases, the builds hitting the warnings were failing already (eg due to broken `python/` directories having been committed to Git, and so turning the warning into an error will actually give them a better error message than before). Closes #1704. GUS-W-17309720.
edmorley
added a commit
that referenced
this pull request
Jul 10, 2025
Builds will now error if either: - The Python buildpack has been run multiple times in the same build. - An existing `.heroku/python/` directory is found in the app source for any other reason (e.g. accidentally committed to Git) This upgrades the warnings added in #1724 in December 2024 to errors. No feedback/concerns were raised in the GitHub issue linked from the warning: #1704 And Honeycomb data shows: - the number of apps hitting the warnings was minimal - in most cases, the builds hitting the warnings were failing already (eg due to broken `python/` directories having been committed to Git, and so turning the warning into an error will actually give them a better error message than before). Closes #1704. GUS-W-17309720.
edmorley
added a commit
that referenced
this pull request
Jul 10, 2025
Builds will now error if either: - The Python buildpack has been run multiple times in the same build. - An existing `.heroku/python/` directory is found in the app source for any other reason (e.g. accidentally committed to Git) This upgrades the warnings added in #1724 in December 2024 to errors. No feedback/concerns were raised in the GitHub issue linked from the warning: #1704 And Honeycomb data shows: - the number of apps hitting the warnings was minimal - in most cases, the builds hitting the warnings were failing already (eg due to broken `python/` directories having been committed to Git, and so turning the warning into an error will actually give them a better error message than before). Closes #1704. GUS-W-17309720.
edmorley
added a commit
that referenced
this pull request
Jul 10, 2025
Builds will now error if either: - The Python buildpack has been run multiple times in the same build. - An existing `.heroku/python/` directory is found in the app source for any other reason (e.g. accidentally committed to Git) This upgrades the warnings added in #1724 in December 2024 to errors. No feedback/concerns were raised in the GitHub issue linked from the warning: #1704 And Honeycomb data shows: - the number of apps hitting the warnings was minimal - in most cases, the builds hitting the warnings were failing already (eg due to broken `python/` directories having been committed to Git, and so turning the warning into an error will actually give them a better error message than before). Closes #1704. GUS-W-17309720.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.heroku/python/directory is found in the app source.The two warnings are the first step towards #1704 and #1710, and will be turned into errors in January 2025.
Towards #1704 and #1710.
GUS-W-17386432.
GUS-W-17309709.