Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/scripts/pull-request-dashboard/execution_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@ def _load(self, ref: str) -> ExecutionCode:
archive.unlink()
script_dir = directory / ".github" / "scripts" / "pull-request-dashboard"
environment = directory / "venv"
self._run([sys.executable, "-m", "venv", str(environment)])
# Install uv in the environment
self._run([sys.executable, "-m", "pip", "install", "--quiet", "uv"])
# Use uv to create and sync the environment
self._run(["uv", "venv", str(environment)])
python = str(
environment / "Scripts" / "python.exe" if sys.platform == "win32"
else environment / "bin" / "python"
)
self._run([python, "-m", "pip", "install", "--quiet", "-r", str(script_dir / "requirements.txt")])
# Install dependencies with uv sync --frozen for reproducible builds
self._run(["uv", "sync", "--frozen", "--project", str(script_dir)])
self._run(["npm", "ci", "--quiet", "--prefix", str(script_dir)])
self._run([python, "-m", "copilot", "download-runtime"])
result = ExecutionCode(ref, script_dir, python)
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/pull-request-dashboard/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "pull-request-dashboard"
version = "0.1.0"
description = "OpenTelemetry Pull Request Dashboard"
requires-python = ">=3.11"
dependencies = [
# Main dependencies
"github-copilot-sdk>=1.0.32",

# Telemetry dependencies (merged from requirements-telemetry.txt)
"opentelemetry-api>=1.45.2",
"opentelemetry-sdk>=1.45.2",
"opentelemetry-exporter-otlp-proto-http>=1.45.2",
]

[dependency-groups]
dev = []
260 changes: 0 additions & 260 deletions .github/scripts/pull-request-dashboard/requirements-telemetry.lock

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions .github/scripts/pull-request-dashboard/requirements.txt

This file was deleted.

618 changes: 618 additions & 0 deletions .github/scripts/pull-request-dashboard/uv.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions .github/workflows/promote-pull-request-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@ jobs:
export TRACEPARENT="$(bash .github/scripts/pull-request-dashboard/github_traceparent.sh)"
python3 .github/scripts/pull-request-dashboard/promote_rollout.py "$RELEASE" "$RELEASE_SHA"

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Install Python dependencies
working-directory: .github/scripts/pull-request-dashboard
run: python3 -m pip install -r requirements.txt
run: uv sync --frozen

- name: Run pull request dashboard tests
working-directory: .github/scripts/pull-request-dashboard
run: python3 -m unittest discover -p 'test_*.py'
run: uv run python -m unittest discover -p 'test_*.py'

- uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
id: otelbot-token
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pull-request-dashboard-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ jobs:
working-directory: .github/scripts/pull-request-dashboard
run: npm ci

- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.15'
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Install Python dependencies
working-directory: .github/scripts/pull-request-dashboard
run: python -m pip install -r requirements.txt
run: uv sync --frozen

- name: Run Python tests
working-directory: .github/scripts/pull-request-dashboard
run: python3 -m unittest discover -p 'test_*.py'
run: uv run python -m unittest discover -p 'test_*.py'

- name: Run JavaScript tests
working-directory: .github/scripts/pull-request-dashboard
Expand Down