Skip to content

migration from pip to uv#3615

Open
ayushgupta704 wants to merge 8 commits intointelowlproject:developfrom
ayushgupta704:feat/migrate-to-uv
Open

migration from pip to uv#3615
ayushgupta704 wants to merge 8 commits intointelowlproject:developfrom
ayushgupta704:feat/migrate-to-uv

Conversation

@ayushgupta704
Copy link
Copy Markdown
Contributor

@ayushgupta704 ayushgupta704 commented Apr 2, 2026

Description

This PR works on the migration from standard pip/requirements.txt to uv.
Since this touches a core part of the project, I approached it carefully to make sure nothing breaks or loses flexibility. The main goal was to improve CI and local build speed while also making dependency management more reliable and reproducible.

Key Changes:

  • uv as the default package manager: Replaced pip with uv across the project. The difference in speed is quite noticeable dependency resolution is much faster, which helps both locally and in CI.
  • Added uv.lock: Introduced a deterministic lockfile with hashes, so environments are reproducible and less prone to unexpected breakages from upstream changes.
  • Updated Dockerfiles & CI: Updated both the main Dockerfile and integration Dockerfiles to use uv pip install. This works as a drop-in replacement, so existing patterns like dynamic variables and requirements.txt files continue to function as before.
  • GitHub Actions updates: Switched linting and test workflows to uv, leveraging built-in caching to improve CI performance.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work
    as expected).

Checklist

  • I have read and understood the rules about [how to Contribute
  • The pull request is for the branch develop
  • I have inserted the copyright banner
  • Linters (Ruff) gave 0 errors.
  • I have added tests for the feature/bug I solved.

@ayushgupta704 ayushgupta704 marked this pull request as draft April 2, 2026 12:01
@ayushgupta704 ayushgupta704 marked this pull request as ready for review April 3, 2026 12:01
@ayushgupta704
Copy link
Copy Markdown
Contributor Author

ayushgupta704 commented Apr 3, 2026

Hii @mlodic
I’ve completed the migration from pip to uv.
I understand the concern around making sure this transition is actually worth it and doesn’t break anything. I’ve gone through the changes carefully and validated them.

Overall, this improves CI performance and reproducibility, while keeping all existing functionality intact.

  • Performance Improvement: Dependency resolution and installation are astronomically faster with uv
    Local Test: Running a fresh uv sync resolves nearly 400 dependencies in under 50
    milliseconds and completes installation in ~1.2 seconds.

  • CI Impact: This drastically reduces the time it takes to build the IntelOwl Docker images
    in the backend-tests and build-main-image pipelines, resulting in faster feedback loops
    for developers and lower CI compute times.

Screenshot 2026-04-03 173519 Screenshot 2026-04-03 173810 Screenshot 2026-04-03 174311 Screenshot 2026-04-03 174642 Screenshot 2026-04-03 174755
  • Deterministic & Secure Builds: We have transitioned from floating requirements.txt to a fully resolved uv.lock file.
  • No Feature loss: The local development and testing stack works natively with uv

The behavior is identical to before, just much faster during the build step:

  • Build the containers (notice the speed of the pip installs)
Screenshot 2026-04-03 182303
  • Run the tests (proving no behavioral changes in the app)
docker exec intelowl_uwsgi coverage run [[manage.py](http://manage.py/)](http://manage.py/) test --keepdb tests
Screen.Recording.2026-04-03.180533.mp4

Everything seems to be running smoothly with the new architecture. Let me know if there’s anything else you’d like me to check!!
Thanks.

@mlodic mlodic added the keep-open To avoid workflow closing PRs label Apr 3, 2026
@mlodic
Copy link
Copy Markdown
Member

mlodic commented Apr 3, 2026

this change will be considered after this release has been completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep-open To avoid workflow closing PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants