Skip to content

Emit metrics for how the Python version was chosen#1069

Merged
edmorley merged 1 commit intomainfrom
python-version-reason-metrics
Sep 18, 2020
Merged

Emit metrics for how the Python version was chosen#1069
edmorley merged 1 commit intomainfrom
python-version-reason-metrics

Conversation

@edmorley
Copy link
Copy Markdown
Member

@edmorley edmorley commented Sep 18, 2020

Currently an app's Python version can be set via a few different means:

  • explicitly by the user (via runtime.txt or Pipfile.lock)
  • implicitly via the sticky versions feature (for existing apps)
  • implicitly via default version for new apps / those with empty cache

In order to determine the priority of features like automatic Python patch version upgrades for sticky-versioned apps, it's useful to have metrics for these.

There were previously no tests for either the sticky versions feature, or changing the Python version by updating the runtime.txt file, so I've added some now (given that I updated the conditional to add the metrics, so useful to have coverage).

I've also removed the confusing overwrite of DEFAULT_PYTHON_VERSION with the cached version, and kept them as two separate variables.

Closes W-8099632.
Closes W-8099645.

@edmorley edmorley self-assigned this Sep 18, 2020
@edmorley edmorley force-pushed the python-version-reason-metrics branch 2 times, most recently from 5ed23df to 3613743 Compare September 18, 2020 17:07
Currently an app's Python version can be set via a few different means:
- explicitly by the user (via `runtime.txt` or `Pipfile.lock`)
- implicitly via the sticky versions feature (for existing apps)
- implicitly via default version for new apps / those with empty cache

In order to determine the priority of features like automatic Python
patch version upgrades for sticky-versioned apps, it's useful to have
metrics for these.

There were previously no tests for either the sticky versions feature,
or changing the Python version by updating the `runtime.txt` file, so
I've added some now (given that I updated the conditional to add the
metrics, so useful to have coverage).

I've also removed the confusing overwrite of `DEFAULT_PYTHON_VERSION`
with the cached version, and kept them as two separate variables.

Closes @W-8099632@.
Closes @W-8099645@.
@edmorley edmorley force-pushed the python-version-reason-metrics branch from 3613743 to 82285e1 Compare September 18, 2020 17:26
@edmorley edmorley marked this pull request as ready for review September 18, 2020 17:34
@edmorley edmorley requested a review from a team as a code owner September 18, 2020 17:34
@edmorley edmorley merged commit eb6ee49 into main Sep 18, 2020
@edmorley edmorley deleted the python-version-reason-metrics branch September 18, 2020 17:48
dryan pushed a commit to dryan/heroku-buildpack-python that referenced this pull request Nov 19, 2020
Currently an app's Python version can be set via a few different means:
- explicitly by the user (via `runtime.txt` or `Pipfile.lock`)
- implicitly via the sticky versions feature (for existing apps)
- implicitly via default version for new apps / those with empty cache

In order to determine the priority of features like automatic Python
patch version upgrades for sticky-versioned apps, it's useful to have
metrics for these.

There were previously no tests for either the sticky versions feature,
or changing the Python version by updating the `runtime.txt` file, so
I've added some now (given that I updated the conditional to add the
metrics, so useful to have coverage).

I've also removed the confusing overwrite of `DEFAULT_PYTHON_VERSION`
with the cached version, and kept them as two separate variables.

Closes @W-8099632@.
Closes @W-8099645@.
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