Skip to content

feat: migrate dashboard dependencies to uv - #528

Draft
irfadkp wants to merge 1 commit into
open-telemetry:mainfrom
irfadkp:migrate-to-uv-deps
Draft

irfadkp wants to merge 1 commit into
open-telemetry:mainfrom
irfadkp:migrate-to-uv-deps

Conversation

@irfadkp

@irfadkp irfadkp commented Nov 15, 2026

Copy link
Copy Markdown

Summary

Migrates pull request dashboard dependencies from pip + requirements.txt to uv + pyproject.toml, as discussed in #517.

Changes

Dependency Management

  • ✅ Replace requirements.txt with pyproject.toml
  • ✅ Generate uv.lock with hash-locked dependencies (28 packages total)
  • ✅ Merge telemetry dependencies into main dependency list
  • ✅ Remove redundant lock files (requirements-telemetry.lock)

Installation Updates

  • ✅ Update execution_code.py to use uv sync --frozen
  • ✅ Update promote-pull-request-dashboard.yml to use uv
  • ✅ Update pull-request-dashboard-test.yml to use uv
  • ✅ Add astral-sh/setup-uv@v3 action to workflows

Benefits

Security 🔒

  • Hash-locked all dependencies (including transitive)
  • Supply chain attack protection
  • Integrity verification on every install
  • SHA256 hashes for all 28 packages

Performance 🚀

  • ~10-100x faster installs (Rust-based resolver)
  • Parallel downloads
  • Reduced CI runtime
  • Smart caching

Maintainability 🛠️

  • Modern Python packaging standards (PEP 621)
  • Single source of truth (pyproject.toml)
  • Automatic Renovate detection (no config changes needed)
  • Simpler dependency updates
  • Merged telemetry deps (1 file instead of 3)

Testing

  • Local install works with uv sync --frozen
  • All packages install correctly
  • Hash verification passes
  • No deprecation warnings
  • Lock file generated successfully (28 packages)
  • CI workflows pass (pending PR checks)

Migration Path

This approach follows the pattern from PR #516 but extends it to use modern uv:

Aspect PR #516 (Telemetry) This PR (Full Migration)
Tool pip-compile uv
Format requirements-telemetry.lock pyproject.toml + uv.lock
Scope Telemetry deps only All dependencies
Install pip install --require-hashes uv sync --frozen
Files 3 separate files 2 unified files

Implementation Details

pyproject.toml Structure

[project]
name = "pull-request-dashboard"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "github-copilot-sdk>=1.0.32",
    "opentelemetry-api>=1.45.2",
    "opentelemetry-sdk>=1.45.2",
    "opentelemetry-exporter-otlp-proto-http>=1.45.2",
]

Lock File

  • 28 total packages (including transitive dependencies)
  • All with SHA256 hashes for integrity verification
  • Reproducible across environments
  • Generated with: uv lock

Workflow Changes

  • Added astral-sh/setup-uv@v3 step to install uv
  • Changed install from pip install -r requirements.txt to uv sync --frozen
  • Use uv run to execute Python in the managed environment
  • Removed explicit Python version setup (handled by requires-python)

Files Changed

Added

  • .github/scripts/pull-request-dashboard/pyproject.toml (new)
  • .github/scripts/pull-request-dashboard/uv.lock (new, ~109KB)

Modified

  • .github/scripts/pull-request-dashboard/execution_code.py
  • .github/workflows/promote-pull-request-dashboard.yml
  • .github/workflows/pull-request-dashboard-test.yml

Removed

  • .github/scripts/pull-request-dashboard/requirements.txt
  • .github/scripts/pull-request-dashboard/requirements-telemetry.txt
  • .github/scripts/pull-request-dashboard/requirements-telemetry.lock

References

Renovate Compatibility

As noted by @adrielp, no Renovate config changes are needed. Renovate automatically detects:

  • pyproject.toml dependencies
  • uv.lock format
  • Will create PRs to bump versions and regenerate lock

Disclosure

Implementation completed with AI assistance (Claude). All changes reviewed, tested, and validated by @irfadkp.


Note: Marked as draft to allow other maintainers to review approach before final merge. Ready to address any feedback! 🙏

- Replace requirements.txt with pyproject.toml + uv.lock
- Merge telemetry dependencies into main dependency list
- Update install commands to use 'uv sync --frozen'
- Remove redundant pip-based lock files
- Add astral-sh/setup-uv@v3 to GitHub Actions workflows

This migration provides:
- Hash-locked transitive dependencies for supply chain security
- 10-100x faster installs via Rust-based resolver
- Modern Python packaging standards (PEP 621)
- Automatic Renovate detection without config changes
- Single source of truth for all dependencies

All 28 packages (including transitive dependencies) are now
hash-locked in uv.lock with SHA256 verification on every install.

Follows maintainer guidance from @adrielp:
open-telemetry#517 (comment)

Fixes open-telemetry#517
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: irfadkp / name: irfadkp (076fcbf)

@irfadkp

irfadkp commented Nov 15, 2026

Copy link
Copy Markdown
Author

Hi @adrielp! 👋

This PR implements your guidance from #517. Key changes:

  • ✅ Migrated to modern uv with pyproject.toml + uv.lock
  • ✅ Merged all dependencies (main + telemetry) into one file
  • ✅ Hash-locked all 28 packages (including transitive deps)
  • ✅ Updated all install locations to use uv sync --frozen
  • ✅ Added astral-sh/setup-uv@v3 to workflows

Marked as draft for your review. Let me know if you'd like any adjustments before I mark it ready!

Testing locally shows:

  • ✅ Lock file generates cleanly
  • ✅ Install works with hash verification
  • ✅ All packages resolve correctly

Ready for CI testing! 🚀

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-11-15 09:04 UTC

Move out of draft to request review.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

This branch has not been deployed

No deployments
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.

Hash-lock pull request dashboard Python dependencies (move to uv)

1 participant