Skip to content

Commit 64abfb2

Browse files
authored
Emit Python version metric events for all builds (#1066)
Previously the metric events describing the chosen Python version were only emitted when that Python version was installed, and not when it was being used from the build cache (the common case). Now the version is emitted for all builds, improving visibility into the distribution of Python usage, and helping determine the priority of features like opt-in automatic Python patch updates. Closes @W-8059668@.
1 parent 12d1cbb commit 64abfb2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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+
- Emit Python version metric events for all builds, not just clean installs (#1066).
56

67
## v178 (2020-09-07)
78

bin/steps/python

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ else
8080
exit 1
8181
fi
8282

83+
mcount "version.python.${PYTHON_VERSION}"
84+
8385
if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then
8486
puts-step "Stack has changed from $CACHED_PYTHON_STACK to $STACK, clearing cache"
8587
rm -fr .heroku/python-stack .heroku/python-version .heroku/python .heroku/vendor .heroku/python .heroku/python-sqlite3-version
@@ -119,8 +121,6 @@ if [ ! "$SKIP_INSTALL" ]; then
119121
# Prepare destination directory.
120122
mkdir -p .heroku/python
121123

122-
mcount "version.python.$PYTHON_VERSION"
123-
124124
if ! curl "${VENDORED_PYTHON}" -s | tar zxv -C .heroku/python &> /dev/null; then
125125
puts-warn "Requested runtime ($PYTHON_VERSION) is not available for this stack ($STACK)."
126126
puts-warn "Aborting. More info: https://devcenter.heroku.com/articles/python-support"

0 commit comments

Comments
 (0)