Skip to content

Conversation

wenxi-onyx
Copy link
Member

@wenxi-onyx wenxi-onyx commented Aug 26, 2025

Description

  • Replicates app.danswer.ai/api/versions in onyx

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.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

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.

  • New Features
    • New GET /versions returns AllVersions {stable, dev, migration} with image tags for: danswer (Onyx), relational_db, index, and nginx.
    • Pulls tags from DockerHub for onyxdotapp/onyx-model-server, onyxdotapp/onyx-backend, and onyxdotapp/onyx-web-server.
    • Uses strict patterns (vX.Y.Z and vX.Y.Z-beta.N), finds tags common to all repos, and selects the latest for each stream.
    • Returns fixed companion tags: postgres:15.2-alpine, vespaengine/vespa:8.277.17, nginx:1.23.4-alpine; migration image set to airgapped-intfloat-nomic-migration.

@wenxi-onyx wenxi-onyx requested a review from a team as a code owner August 26, 2025 23:13
Copy link

vercel bot commented Aug 26, 2025

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

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Aug 27, 2025 0:47am

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 three ContainerVersions 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

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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.

wenxi-onyx and others added 2 commits August 26, 2025 16:27
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@wenxi-onyx wenxi-onyx merged commit 2dec009 into main Aug 27, 2025
11 of 15 checks passed
@wenxi-onyx wenxi-onyx deleted the whuang/new_versions_api branch August 27, 2025 01:14
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* 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>
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.

2 participants