Skip to content

add deterministic sorting to model revision list query - #7363

Open
andersendsa wants to merge 1 commit into
open-edge-platform:developfrom
andersendsa:model-revision-ordering
Open

add deterministic sorting to model revision list query#7363
andersendsa wants to merge 1 commit into
open-edge-platform:developfrom
andersendsa:model-revision-ordering

Conversation

@andersendsa

@andersendsa andersendsa commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Added an order_by clause to ModelRevisionRepository.list_all to order by created_at descending and name ascending. This fixes inconsistent model ordering observed between environments.

Closes:#6212

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

Copilot AI lite review requested due to automatic review settings August 23, 2026 05:29
@andersendsa
andersendsa requested a review from a team as a code owner August 23, 2026 05:29
@github-actions github-actions Bot added the Geti Backend Issues related to the Geti application server label Aug 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the backend ModelRevisionRepository.list_all query to return model revisions in a consistent order, addressing inconsistent ordering across environments by adding an explicit ORDER BY.

Changes:

  • Added an order_by clause to sort model revisions by created_at (descending) and name (ascending).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

if training_status is not None:
stmt = stmt.where(ModelRevisionDB.training_status == training_status)

stmt = stmt.order_by(ModelRevisionDB.created_at.desc(), ModelRevisionDB.name.asc())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Geti Backend Issues related to the Geti application server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants