Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: Migrate from pip-compile to uv #1177

Merged
merged 22 commits into from
Mar 3, 2025
Merged

dev: Migrate from pip-compile to uv #1177

merged 22 commits into from
Mar 3, 2025

Conversation

ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Feb 26, 2025

Purpose/Motivation

As part of migrating over to umbrella (our future monorepo), we want to make sure everything is on the same package management system for much easier dependency management across each workspace. This PR mimics the changes done in codecov/worker#1098 by updating the Makefile, README, and dockerfiles to support uv in lieu of pip / pip-compile.

I was honestly shocked it basically just worked after that, there were a couple dependency updates I had to do and I also removed ddtrace since I'm pretty sure we use Sentry exclusively for tracing now (confirmed with @trent-codecov) but nothing really other than that so kudos to @michelletran-codecov for a really easy to follow experience 😅

I also removed the opentracing and setproctitle packages since I didn't see any references to those either.

I should probably also double check all the package versions uv installed and pin them to actual versions

Links to relevant tickets

Closes codecov/engineering-team#3371

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@ajay-sentry ajay-sentry requested a review from a team as a code owner February 26, 2025 23:37
pyproject.toml Outdated
"django-better-admin-arrayfield",
"django-cors-headers",
"django-csp",
"django-cursor-pagination",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to add django-cursor-pagination

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some versioning for the dependencies that are missing them? We can use some more relaxed versioning (i.e. >=), but it would be best practice to include some sort of version pinning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally agreed, updated to what the requirement.txt file had previously and pinned to the exact version.

In the process also removed opentracing and setproctitle since they looked unused

Copy link
Contributor

@michelletran-codecov michelletran-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also remove the requirements.in and requirements.txt.

@@ -78,7 +78,7 @@ jobs:
needs: [build-self-hosted, test]
secrets: inherit
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.27
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.33
with:
push_rolling: true
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also might need a cache_file param for this self-hosted workflow to pick the uv.lock file to hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in f9f2257

pyproject.toml Outdated
"django-better-admin-arrayfield",
"django-cors-headers",
"django-csp",
"django-cursor-pagination",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some versioning for the dependencies that are missing them? We can use some more relaxed versioning (i.e. >=), but it would be best practice to include some sort of version pinning.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.88%. Comparing base (0ec7fe2) to head (953adbc).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1177      +/-   ##
==========================================
- Coverage   95.89%   95.88%   -0.01%     
==========================================
  Files         494      493       -1     
  Lines       16887    16869      -18     
==========================================
- Hits        16193    16175      -18     
  Misses        694      694              
Flag Coverage Δ
unit 95.88% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, I believe one cache_file is missing from the GHA workflow as @michelletran-codecov also mentioned.

@ajay-sentry ajay-sentry added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit bd2fea7 Mar 3, 2025
27 of 28 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/uv-test branch March 3, 2025 18:09
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.

Migrate api to uv
4 participants