Skip to content

[chore] Migrate from poetry to uv#4267

Merged
bekossy merged 15 commits intorelease/v0.99.1from
chore/move-to-uv
May 5, 2026
Merged

[chore] Migrate from poetry to uv#4267
bekossy merged 15 commits intorelease/v0.99.1from
chore/move-to-uv

Conversation

@jp-agenta
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 5, 2026 5:53pm

Request Review

@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 5, 2026
@dosubot dosubot Bot added python:uv Pull requests that update python:uv code refactoring A code change that neither fixes a bug nor adds a feature labels May 5, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c744f656-95b8-4b48-b9c9-c2ff75a04937

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/move-to-uv

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-05-05T17:59:29.163Z

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (6)
sdk/check_deps.py (1)

97-110: ⚡ Quick win

Add error handling for PyPI requests.

urllib.request.urlopen can raise URLError, HTTPError, or timeout exceptions. A single network failure will crash the entire script, losing any progress on previous packages.

Proposed fix with error handling
 def load_pypi_latest(package_names: list[str]) -> dict[str, str]:
     latest: dict[str, str] = {}
 
     for name in package_names:
-        with urllib.request.urlopen(
-            f"https://pypi.org/pypi/{name}/json", timeout=10
-        ) as response:
-            payload = json.loads(response.read().decode("utf-8"))
-        version = payload.get("info", {}).get("version")
-        if not version:
+        try:
+            with urllib.request.urlopen(
+                f"https://pypi.org/pypi/{name}/json", timeout=10
+            ) as response:
+                payload = json.loads(response.read().decode("utf-8"))
+            version = payload.get("info", {}).get("version")
+            if not version:
+                continue
+            latest[name] = version
+        except (urllib.error.URLError, urllib.error.HTTPError, TimeoutError) as e:
+            print(f"Warning: Failed to fetch {name} from PyPI: {e}")
             continue
-        latest[name] = version
 
     return latest

Note: You'll also need to add import urllib.error at the top.

api/oss/docker/Dockerfile.gh (1)

6-6: 💤 Low value

Unused ARG declaration.

ARG UV_VERSION is declared in the builder stage but never used. The uv binary is copied from the uv stage via COPY --from=uv, so this ARG serves no purpose here.

🧹 Proposed fix
 FROM python:3.11-slim-bookworm AS builder
 
-ARG UV_VERSION
-
 WORKDIR /app
.github/workflows/12-check-unit-tests.yml (1)

99-104: 💤 Low value

Minor inconsistency: --no-sync flag usage differs between jobs.

The SDK test run command (line 104) uses uv run python without --no-sync, while the API (line 161) and services (line 230) jobs use uv run --no-sync python. Since uv sync runs immediately before, --no-sync is appropriate and slightly faster. Consider adding it here for consistency.

-        run: uv run python run-tests.py -- oss/tests/pytest/unit
+        run: uv run --no-sync python run-tests.py -- oss/tests/pytest/unit
docs/docs/contributing/guides/testing.mdx (2)

55-63: ⚡ Quick win

Documentation inconsistency: API test commands don't use uv run.

The SDK section correctly uses uv run pytest, but the API section uses bare python -m pytest. For consistency with uv workflow and to ensure the correct virtual environment is used, these should also use uv run:

 Then run the acceptance suite or a smaller target:

 ```bash
-python -m pytest oss/tests/pytest/ -v
+uv run pytest oss/tests/pytest/ -v
-python -m pytest oss/tests/pytest/acceptance/workflows/ -v
+uv run pytest oss/tests/pytest/acceptance/workflows/ -v

---

`83-90`: _⚡ Quick win_

**Services section is incomplete: no test execution commands.**

The Services Tests section shows dependency installation but omits the pytest command. Consider adding the test execution step for completeness:

```diff
 ```bash
 uv sync
 uv pip install --editable ../sdk

+Then run the relevant pytest targets:
+
+bash +uv run pytest oss/tests/pytest/unit/ -v +


</blockquote></details>
<details>
<summary>services/check_deps.py (1)</summary><blockquote>

`97-110`: _💤 Low value_

**Consider adding basic error handling for PyPI requests.**

`load_pypi_latest()` will crash the script if any PyPI request fails (network issues, 404 for a private/renamed package, etc.). A try/except would make this dev tool more robust:

<details>
<summary>🛡️ Proposed improvement</summary>

```diff
 def load_pypi_latest(package_names: list[str]) -> dict[str, str]:
     latest: dict[str, str] = {}

     for name in package_names:
-        with urllib.request.urlopen(
-            f"https://pypi.org/pypi/{name}/json", timeout=10
-        ) as response:
-            payload = json.loads(response.read().decode("utf-8"))
-        version = payload.get("info", {}).get("version")
-        if not version:
+        try:
+            with urllib.request.urlopen(
+                f"https://pypi.org/pypi/{name}/json", timeout=10
+            ) as response:
+                payload = json.loads(response.read().decode("utf-8"))
+            version = payload.get("info", {}).get("version")
+            if not version:
+                continue
+            latest[name] = version
+        except Exception:
             continue
-        latest[name] = version

     return latest

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 18f41d37-7ff4-4093-bffd-b7522373598a

📥 Commits

Reviewing files that changed from the base of the PR and between 855bcb7 and 671e0fd.

⛔ Files ignored due to path filters (6)
  • api/poetry.lock is excluded by !**/*.lock
  • api/uv.lock is excluded by !**/*.lock
  • sdk/poetry.lock is excluded by !**/*.lock
  • sdk/uv.lock is excluded by !**/*.lock
  • services/poetry.lock is excluded by !**/*.lock
  • services/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (23)
  • .github/workflows/01-create-release-branch.yml
  • .github/workflows/11-check-code-styling.yml
  • .github/workflows/12-check-unit-tests.yml
  • .github/workflows/44-railway-tests.yml
  • api/check_deps.py
  • api/ee/docker/Dockerfile.dev
  • api/ee/docker/Dockerfile.gh
  • api/oss/docker/Dockerfile.dev
  • api/oss/docker/Dockerfile.gh
  • api/pyproject.toml
  • docs/designs/testing/README.md
  • docs/docs/contributing/guides/testing.mdx
  • sdk/__init__.py
  • sdk/check_deps.py
  • sdk/oss/tests/pytest/unit/README.md
  • sdk/oss/tests/pytest/unit/TESTING_PATTERNS.md
  • sdk/pyproject.toml
  • services/check_deps.py
  • services/ee/docker/Dockerfile.dev
  • services/ee/docker/Dockerfile.gh
  • services/oss/docker/Dockerfile.dev
  • services/oss/docker/Dockerfile.gh
  • services/pyproject.toml

Comment thread .github/workflows/01-create-release-branch.yml Outdated
Comment thread api/check_deps.py
Comment thread docs/designs/testing/README.md
Comment thread sdk/pyproject.toml
bekossy added 2 commits May 5, 2026 19:22
[chore] Move to uvloop and httptools
[chore] Bump to python 3.13 / debian 13
@bekossy bekossy changed the base branch from release/v0.99.0 to release/v0.99.1 May 5, 2026 17:23
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 5, 2026
@bekossy bekossy merged commit f2912f8 into release/v0.99.1 May 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer python:uv Pull requests that update python:uv code refactoring A code change that neither fixes a bug nor adds a feature size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants