Skip to content

Conversation

@JortBergfeld
Copy link
Contributor

@JortBergfeld JortBergfeld commented Jan 12, 2026

This pull request adds support for renaming a model revision by its ID through a new PATCH endpoint, updates the service layer to handle model name updates, and introduces an integration test to verify this new functionality.

API Enhancements:

  • Added a new PATCH endpoint (/{model_id}) to routers/models.py allowing clients to rename a model revision, including OpenAPI documentation and request body examples. [1] [2]

Service Layer Updates:

  • Implemented the rename_model method in ModelService to update a model revision's name, with proper error handling if the model is not found.

Testing:

  • Added an integration test test_update_model to ensure the model name update functionality works as expected.

Resolves #5057

How to test

Added integration test for update_model

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)

@JortBergfeld JortBergfeld self-assigned this Jan 12, 2026
@github-actions github-actions bot added TEST Any changes in tests Geti Tune Backend Issues related to Geti Tune backend labels Jan 12, 2026
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

📊 Test coverage report

Metric Coverage
Lines 38.7%
Functions 33.9%
Branches 85.5%
Statements 38.7%

@github-actions github-actions bot added the BUILD label Jan 12, 2026
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5166 2.85G
geti-tune-cpu:sha-987547b 2.85G

GPU

Image Size
geti-tune-gpu:pr-5166 10.63G
geti-tune-gpu:sha-987547b 10.63G

XPU

Image Size
geti-tune-xpu:pr-5166 8.70G
geti-tune-xpu:sha-987547b 8.70G

@JortBergfeld JortBergfeld marked this pull request as ready for review January 12, 2026 11:29
@JortBergfeld JortBergfeld requested a review from a team as a code owner January 12, 2026 11:29
Copilot AI review requested due to automatic review settings January 12, 2026 11:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds functionality to rename model revisions through a new PATCH endpoint, enabling clients to update a model's name by its ID.

Changes:

  • Added a PATCH endpoint to support renaming model revisions
  • Implemented service layer logic to handle model name updates with proper error handling
  • Added integration test coverage for the new update functionality

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
application/docker/Dockerfile Updated libglib2.0 package version to newer release
application/backend/app/api/routers/models.py Added new PATCH endpoint for renaming models with OpenAPI documentation
application/backend/app/services/model_service.py Implemented update_model method to handle model name updates
application/backend/tests/integration/services/test_model_service.py Added integration test to verify model name update functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@leoll2 leoll2 left a comment

Choose a reason for hiding this comment

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

One minor suggestion, LGTM

@JortBergfeld
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Jan 13, 2026

@JortBergfeld I've opened a new pull request, #5174, to work on those changes. Once the pull request is ready, I'll request review from you.

@JortBergfeld JortBergfeld force-pushed the jort/endpoint_rename_model_revision branch from f7e061d to 34e6188 Compare January 13, 2026 09:40
@jpggvilaca jpggvilaca force-pushed the jort/endpoint_rename_model_revision branch from 34e6188 to 031c8a6 Compare January 13, 2026 13:03
@jpggvilaca jpggvilaca requested a review from a team as a code owner January 13, 2026 13:03
@github-actions github-actions bot added the Geti Tune UI Issues related to Geti Tune UI label Jan 13, 2026
camiloHimura
camiloHimura previously approved these changes Jan 13, 2026
camiloHimura
camiloHimura previously approved these changes Jan 13, 2026
@JortBergfeld JortBergfeld added this pull request to the merge queue Jan 14, 2026
Merged via the queue into develop with commit 76eee4c Jan 14, 2026
31 checks passed
@JortBergfeld JortBergfeld deleted the jort/endpoint_rename_model_revision branch January 14, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD Geti Tune Backend Issues related to Geti Tune backend Geti Tune UI Issues related to Geti Tune UI TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add endpoint to rename model

5 participants