Skip to content

Conversation

@anik120
Copy link
Contributor

@anik120 anik120 commented Nov 9, 2025

Description

greenlet is required by SQLAlchemy for async database operations with SQLite. Without it, llama-stack server fails to start when initializing SQLite-backed stores (files, agents, vector_io, etc.) using async context managers.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Chores
    • Updated project dependencies for improved compatibility with asynchronous operations.

greenlet is required by SQLAlchemy for async database operations with
SQLite. Without it, llama-stack server fails to start when initializing
SQLite-backed stores (files, agents, vector_io, etc.) using async
context managers.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

Added greenlet>=3.0.0 dependency to pyproject.toml to support SQLAlchemy async operations. This is a single-line dependency addition with no other functional modifications.

Changes

Cohort / File(s) Summary
Dependency additions
pyproject.toml
Added greenlet>=3.0.0 dependency for SQLAlchemy async operations support

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Verify that greenlet version 3.0.0 or higher is compatible with the project's Python version and other dependencies
  • Confirm the comment rationale aligns with current SQLAlchemy async requirements

Poem

🐰 A greenlet so tender, so bright,
For async ops running through the night,
The rabbit hops swiftly, no more single-thread fright,
SQLAlchemy flows with concurrent delight! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add greenlet dependency for async SQLAlchemy operations' directly and clearly summarizes the main change—adding the greenlet dependency to support async SQLAlchemy operations, which aligns perfectly with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci
Copy link

openshift-ci bot commented Nov 9, 2025

Hi @anik120. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
pyproject.toml (1)

49-50: Consider updating to greenlet>=3.1.0 for Python 3.13 support.

Python 3.13 support was added to greenlet in version 3.1.0 (Sept 2024), but the current constraint allows greenlet>=3.0.0, which would permit greenlet 3.0.x versions that lack Python 3.13 support. Since the project supports Python 3.12-3.13 (line 21), updating the constraint to greenlet>=3.1.0 would ensure compatibility across the full Python version range.

Apply this diff to ensure Python 3.13 compatibility:

    # Required by SQLAlchemy for async operations
-   "greenlet>=3.0.0",
+   "greenlet>=3.1.0",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a5c345 and b921dd0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pyproject.toml

📄 CodeRabbit inference engine (CLAUDE.md)

pyproject.toml: ALWAYS check pyproject.toml for existing dependencies before adding new ones
ALWAYS verify current library versions in pyproject.toml rather than assuming versions
Prefer reading supported Python versions and tool configs from pyproject.toml

Files:

  • pyproject.toml
🧠 Learnings (2)
📚 Learning: 2025-09-18T16:46:33.353Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to pyproject.toml : ALWAYS check pyproject.toml for existing dependencies before adding new ones

Applied to files:

  • pyproject.toml
📚 Learning: 2025-08-18T10:58:14.951Z
Learnt from: matysek
Repo: lightspeed-core/lightspeed-stack PR: 292
File: pyproject.toml:47-47
Timestamp: 2025-08-18T10:58:14.951Z
Learning: psycopg2-binary is required by some llama-stack providers in the lightspeed-stack project, so it cannot be replaced with psycopg v3 or moved to optional dependencies without breaking llama-stack functionality.

Applied to files:

  • pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: e2e_tests (azure)

@tisnik
Copy link
Contributor

tisnik commented Nov 10, 2025

/ok-to-test

@asimurka
Copy link

@anik120 According to the SQLAlchemy docs and other resources, using sqlalchemy[asyncio] should be equivalent to manually installing greenlet and is the recommended approach. WDYT?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants