Skip to content

Commit f225177

Browse files
authored
Add metrics for the existence of a uv lockfile (#1725)
To help gauge how often a uv lockfile exists. (Either from someone trying to use uv and the build failing, or when a third-party buildpack is used to export the uv lockfile to a requirements file etc). Towards #1616. GUS-W-17431743.
1 parent dfd025b commit f225177

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
- Fixed Dev Center links to reflect recent article URL changes. ([#1723](https://github.com/heroku/heroku-buildpack-python/pull/1723))
6+
- Added metrics for the existence of a uv lockfile. ([#1725](https://github.com/heroku/heroku-buildpack-python/pull/1725))
67

78
## [v271] - 2024-12-12
89

bin/report

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ ALL_OTHER_FIELDS=(
9494
setup_py_only
9595
sqlite_install_duration
9696
total_duration
97+
uv_lockfile
9798
)
9899

99100
for field in "${STRING_FIELDS[@]}"; do

lib/package_manager.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function package_manager::determine_package_manager() {
5959
meta_set "setup_py_only" "false"
6060
fi
6161

62+
if [[ -f "${build_dir}/uv.lock" ]]; then
63+
meta_set "uv_lockfile" "true"
64+
fi
65+
6266
local num_package_managers_found=${#package_managers_found[@]}
6367

6468
case "${num_package_managers_found}" in
@@ -87,6 +91,11 @@ function package_manager::determine_package_manager() {
8791
Otherwise, add a package manager file to your app. If your app has
8892
no dependencies, then create an empty 'requirements.txt' file.
8993
94+
If you would like to see support for the package manager uv,
95+
please vote and comment on these GitHub issues:
96+
https://github.com/heroku/heroku-buildpack-python/issues/1616
97+
https://github.com/heroku/roadmap/issues/323
98+
9099
For help with using Python on Heroku, see:
91100
https://devcenter.heroku.com/articles/getting-started-with-python
92101
https://devcenter.heroku.com/articles/python-support

spec/hatchet/package_manager_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
remote: ! Otherwise, add a package manager file to your app. If your app has
3232
remote: ! no dependencies, then create an empty 'requirements.txt' file.
3333
remote: !
34+
remote: ! If you would like to see support for the package manager uv,
35+
remote: ! please vote and comment on these GitHub issues:
36+
remote: ! https://github.com/heroku/heroku-buildpack-python/issues/1616
37+
remote: ! https://github.com/heroku/roadmap/issues/323
38+
remote: !
3439
remote: ! For help with using Python on Heroku, see:
3540
remote: ! https://devcenter.heroku.com/articles/getting-started-with-python
3641
remote: ! https://devcenter.heroku.com/articles/python-support

0 commit comments

Comments
 (0)