Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Add a simple version check to inform users of outdated versions #555

Closed
@lukehinds

Description

@lukehinds

Description:

Currently, there’s no built-in way for users to know if their instance of CodeGate is running an outdated version. This can cause a sub-par experience or potential security or compatibility issues.

I’d like to propose a simple version-checking system that:

  1. Stores the current local version (e.g., in a VERSION file at the repo root or an environment variable).
  2. Fetches the latest version from GitHub (via either:
  3. Compares the local version to the latest version.
  4. Notifies users (in the frontend or logs) when a newer version is available.

Why this is needed

  • No current version-awareness: At present, there’s no way of knowing if a user is running an outdated version of CodeGate.
  • User-friendly: A quick version check can warn users when they need to update CodeGate.
  • Lightweight: Fetching a single file or release tag from GitHub is straightforward and doesn’t require infrastructure.

Proposed Steps

  1. Create/maintain a VERSION file at the root of the repository or using the existing https://github.com/stacklok/codegate/blob/main/src/codegate/__init__.py#L17, and have it updated each time we release new code (automate via GH actions when we publish a release).
  2. Implement a /api/version endpoint in the FastAPI backend that returns the local (running) version.
  3. Add a check against GitHub (e.g., /api/update-status), fetching the latest release or raw VERSION file from the main branch.
  4. Compare local vs. remote versions and return a response indicating whether the app is up to date (e.g., "is_latest": true/false).
  5. Notify the front end (React) whenever a mismatch is found, so users can see a banner or message like, “A new version of CodeGate is available!”

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions