Skip to content

Fix empty related chunk generation for tasks in cloud storage#10277

Merged
SpecLad merged 2 commits intocvat-ai:developfrom
SpecLad:fix-empty-related-chunk
Feb 16, 2026
Merged

Fix empty related chunk generation for tasks in cloud storage#10277
SpecLad merged 2 commits intocvat-ai:developfrom
SpecLad:fix-empty-related-chunk

Conversation

@SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Feb 13, 2026

Motivation and context

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.

How has this been tested?

REST API tests.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@SpecLad SpecLad force-pushed the fix-empty-related-chunk branch from 55d3e04 to e3b3a12 Compare February 13, 2026 16:27
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.
@SpecLad SpecLad force-pushed the fix-empty-related-chunk branch from e3b3a12 to 184e577 Compare February 13, 2026 16:30
@SpecLad SpecLad marked this pull request as ready for review February 13, 2026 16:30
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.73%. Comparing base (8332555) to head (47f9d83).
⚠️ Report is 4 commits behind head on develop.

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     
Components Coverage Δ
cvat-ui 77.80% <ø> (+0.15%) ⬆️
cvat-server 86.46% <75.00%> (-0.45%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SpecLad SpecLad merged commit 3a056a8 into cvat-ai:develop Feb 16, 2026
38 checks passed
@SpecLad SpecLad deleted the fix-empty-related-chunk branch February 16, 2026 16:42
@cvat-bot cvat-bot bot mentioned this pull request Feb 17, 2026
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.

3 participants