-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: add api/versions to onyx #5268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR adds a new /api/versions
endpoint to Onyx that replicates functionality from app.danswer.ai/api/versions. The implementation consists of two main parts:
Data Models: Two new Pydantic models are added to models.py
:
ContainerVersions
: Defines the structure for container versions with four components (danswer, relational_db, index, nginx)AllVersions
: Contains threeContainerVersions
instances for different deployment environments (stable, dev, migration)
Public Endpoint: The /versions
endpoint is added to the PUBLIC_ENDPOINT_SPECS
list in auth_check.py
, making it publicly accessible without authentication. This endpoint fetches Docker image version information from DockerHub and returns it in the structured format defined by the new models.
The endpoint appears to be designed for automated tooling, deployment scripts, or monitoring systems that need to programmatically retrieve current version information for different Onyx deployment scenarios. This fits into the broader application architecture by providing external visibility into available container versions, supporting automated deployment and update workflows.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only adds new functionality without modifying existing behavior
- Score reflects simple additive changes with clear data models, though the actual endpoint implementation isn't visible in the diff
- Pay close attention to the endpoint implementation in get_state.py to ensure proper error handling and API design
2 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 3 files
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
* add api/versions to onyx * add test and rename onyx * cubic nit Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * move api version constants and add explanatory comment --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Description
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.
Summary by cubic
Adds a public GET /versions endpoint that returns the latest stable and beta Onyx Docker image versions across components, mirroring app.danswer.ai/api/versions. Also whitelists the route in auth to allow unauthenticated reads.