Conversation
In #1011 the number of buildpack variables that are exported (and so exposed to subprocesses) was reduced, since in general we don't want to leak buildpack internals into end-user steps such as the pre/post compile hooks. However since this change, any buildpack metric emitted from within a `sub_env` wrapper (which is a buildpack-stdlib utility function) is missing its `buildpack.python` prefix. This is because buildpack-stdlib: * lazy-loads `BPLOG_PREFIX` (rather than doing so when initially sourced, which is the approach used for `BUILDPACK_LOG_FILE`) * doesn't check whether `BPLOG_PREFIX` is set before emitting metrics See: https://github.com/heroku/buildpack-stdlib/blob/v8/stdlib.sh As a stop-gap until we either fix this in buildpack-stdlib (W-8095466), or remove usages of the `sub_env` wrapper (since I think they are counter-productive in this buildpack), I've added back the export for `BPLOG_PREFIX`. Fixes @W-8095436@.
a4a3a77 to
249ac86
Compare
danielleadams
approved these changes
Oct 15, 2020
edmorley
added a commit
that referenced
this pull request
Oct 19, 2020
dryan
pushed a commit
to dryan/heroku-buildpack-python
that referenced
this pull request
Nov 19, 2020
In heroku#1011 the number of buildpack variables that are exported (and so exposed to subprocesses) was reduced, since in general we don't want to leak buildpack internals into end-user steps such as the pre/post compile hooks. However since this change, any buildpack metric emitted from within a `sub_env` wrapper (which is a buildpack-stdlib utility function) is missing its `buildpack.python` prefix. This is because buildpack-stdlib: * lazy-loads `BPLOG_PREFIX` (rather than doing so when initially sourced, which is the approach used for `BUILDPACK_LOG_FILE`) * doesn't check whether `BPLOG_PREFIX` is set before emitting metrics See: https://github.com/heroku/buildpack-stdlib/blob/v8/stdlib.sh As a stop-gap until we either fix this in buildpack-stdlib (W-8095466), or remove usages of the `sub_env` wrapper (since I think they are counter-productive in this buildpack), I've added back the export for `BPLOG_PREFIX`. Fixes @W-8095436@.
dryan
pushed a commit
to dryan/heroku-buildpack-python
that referenced
this pull request
Nov 19, 2020
The changelog entries for heroku#1099 and heroku#1100 were added to the previous release section (rather than the "unreleased" section) by mistake.
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.
In #1011 the number of buildpack variables that are exported (and so exposed to subprocesses) was reduced, since in general we don't want to leak buildpack internals into end-user steps such as the pre/post compile hooks.
However since this change, any buildpack metric emitted from within a
sub_envwrapper (which is a buildpack-stdlib utility function) is missing itsbuildpack.pythonprefix.This is because buildpack-stdlib:
BPLOG_PREFIX(rather than doing so when initially sourced, which is the approach used forBUILDPACK_LOG_FILE)BPLOG_PREFIXis set before emitting metricsSee:
https://github.com/heroku/buildpack-stdlib/blob/v8/stdlib.sh
As a stop-gap until we either fix this in buildpack-stdlib (W-8095466), or remove usages of the
sub_envwrapper (since I think they are counter-productive in this buildpack), I've added back the export forBPLOG_PREFIX.Fixes W-8095436.