Fix empty related chunk generation for tasks in cloud storage#10277
Merged
SpecLad merged 2 commits intocvat-ai:developfrom Feb 16, 2026
Merged
Fix empty related chunk generation for tasks in cloud storage#10277SpecLad merged 2 commits intocvat-ai:developfrom
SpecLad merged 2 commits intocvat-ai:developfrom
Conversation
55d3e04 to
e3b3a12
Compare
When `frame_media` is empty (i.e. there are no related images for a frame), the `truncate_common_filename_prefix` logic crashes, because `os.path.commonpath` requires at least one path as input. This only happens when the task is in cloud storage, because the non-cloud branch constructs the `media` list in such a way that frames with no related images are simply omitted. This works fine, so factor out that logic and use it in the cloud case as well.
e3b3a12 to
184e577
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #10277 +/- ##
===========================================
+ Coverage 82.65% 82.73% +0.07%
===========================================
Files 430 481 +51
Lines 46579 49643 +3064
Branches 4198 4198
===========================================
+ Hits 38499 41070 +2571
- Misses 8080 8573 +493
🚀 New features to boost your workflow:
|
zhiltsov-max
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and context
When
frame_mediais empty (i.e. there are no related images for a frame), thetruncate_common_filename_prefixlogic crashes, becauseos.path.commonpathrequires at least one path as input.This only happens when the task is in cloud storage, because the non-cloud branch constructs the
medialist in such a way that frames with no related images are simply omitted. This works fine, so factor out that logic and use it in the cloud case as well.How has this been tested?
REST API tests.
Checklist
developbranch[ ] I have updated the documentation accordingly[ ] I have linked related issues (see GitHub docs)License
Feel free to contact the maintainers if that's a concern.