Skip to content

Release v2.52.0#10123

Merged
cvat-bot[bot] merged 38 commits intomasterfrom
release-2.52.0
Dec 16, 2025
Merged

Release v2.52.0#10123
cvat-bot[bot] merged 38 commits intomasterfrom
release-2.52.0

Conversation

@cvat-bot
Copy link
Contributor

@cvat-bot cvat-bot bot commented Dec 15, 2025

Added

Changed

Removed

Fixed

cvat-bot bot and others added 30 commits December 1, 2025 18:30
Now that we dropped Python 3.9, we can use this, which is a little more
readable than `Union[X, Y]` and `Optional[X]`.

The following command was used to perform the replacement:

    ruff check --select=UP007,UP045 cvat-cli/ utils/ --fix

Since this change creates a fair bit of churn, I'm doing it piecemeal
rather than updating the whole codebase at once.
This is a continuation of #10060.

I kept the old syntax in generator templates, because I can't run Ruff
on them. The old syntax is not deprecated, so it shouldn't be a problem.
This PR adds plugin support for job annotation view menu and player. 
Also splitted logic for fetching and decoding `contextImages` into two separate methods.
This error meant that the context wouldn't get prepended, resulting in
an incomplete error message.
These are minor refactorings in preparation for a bigger change:

* Support the `dimension` argument in all writers.
* Make constructor arguments kw-only to avoid order confusion.
* Merge `get_chunk_mime_type_for_writer` into the writer types.
* Remove unused return values.
When users navigate to non-existent resources (invalid task ID, project ID, job ID, or cloud storage ID), they see a Not Found error page but have no easy way to navigate back.
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/).
-->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
For some models we should append extra information, e.g. license link

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [ ] I have created a changelog fragment <!-- see top comment in
CHANGELOG.md -->
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
-   urllib py package to 2.6.0
-   golang build base image to 1.25.5
…nge (#10079)

Currently this doesn't work, because:

1. `create_thread` calls `_download_data_from_cloud_storage` to download
only those frames that match the frame range;

2. It tries to create a manifest, passing paths to _all_ frames.

3. `ImageManifestManager` tries to open a frame that hasn't been
downloaded, and crashes.

Fix this by removing the frame filtering when downloading the frames.
This is obviously not optimal performance-wise, but it's better than not
working at all.

To be fair, this also slows down the case where a cloud storage manifest
is used. IMO, it is acceptable to take a performance hit in this case to
reduce complexity.
…rame range (#10004)

Let's say we have a cloud storage-based task that was created with 6
input images, and the following settings: start frame 1, stop frame 4,
frame step 2. A heavyweight backup of such a task will then contain only
frames 1 and 3 in the `data` directory; however, the manifest will still
contain all 6 frames. If you try to restore such a backup, CVAT will
fail, because it checks that the files in the `data` directory
correspond 1:1 to the manifest.

This could potentially be fixed in the restore code; however, it seems
to me that the backups created in this case are incorrect, as they have
manifests referencing nonexistent files. As such, I think it's more
appropriate to fix this in the backup code.

The fix is to filter the manifest during backup, leaving only entries
corresponding to frames that actually get backed up. We also need to
reset the frame range to the default, so that it matches the filtered
manifest.

Note that the same bug also affects backups of tasks based on the
mounted share. It should be reasonably easy to fix (just use
`_write_filtered_media_manifest` in the `StorageChoice.SHARE` branch),
but I cannot test such a fix, because share backups are currently broken
entirely. So I will defer this fix until #9972.

This bug does _not_ affect backups of tasks based on local files,
because those currently include _all_ frames, even those that fall
outside that frame range. I think that behavior is probably wrong, but
it doesn't require immediate fixing.
Fixes #4989
Fixes #6149
Fixes #7965
Fixes #8297

There are three problems here.

First, CVAT refuses to back up such tasks if they use static chunks.
There doesn't seem to be much purpose for this; the backup process
doesn't even use chunks. With the check removed, the backups work fine.

Second, even when backing up succeeds, restoring fails with "No such
file or directory: <root>/share/manifest.jsonl".

IMO, the problem here is not really in the restore logic, but in the
backup logic. Share task backups are "heavyweight", in that they include
a copy of the media files. But the `storage` field in `task.json` is
still set to "share". As a result, CVAT tries to import it as a share
task, and that logic is broken.

I think we should handle such backups consistently with heavyweight
cloud storage backups, and set `storage` to "local". The restore logic
will then work perfectly well. In the future, if we happen to implement
lightweight backups for share tasks, we can use `storage: "share"` for
those.

Third, if a task has images and a custom frame range (start frame/stop
frame/step), then importing the backup _also_ doesn't work for reasons
described in #10004. We can fix this using the
`_write_filtered_media_manifest` function introduced in that PR.

This PR also removes logic from `create_thread` that tries to fix up
backups that have `storage="share"`. After this patch, such backups no
longer need fixing up (and before the patch, they couldn't be imported
anyway).
This is a continuation of #10060.

I also added a couple of `TypeAlias` annotations where appropriate, and
changed the import style in `test_users.py` to be more consistent with
other files.
When tracks are exported (in most formats), interpolation happens and
interpolated shapes are kept in RAM.
E.g. if a track is 100 frames long and has 10 keyframes, only 10 shapes
are read from db and kept in RAM before the interpolation.
Then, after interpolation, there are 100 shapes which are kept in RAM
during export - 10x more ram is used.

This PR makes interpolation function into a generator, to not keep all
those non-key shapes in RAM.
SpecLad and others added 8 commits December 12, 2025 17:43
This just makes the failures harder to investigate.
Technically, there are still some left in `cvat-sdk/gen/templates`, but
I don't care enough about updating those.

In `frame_provider.py`, add explicit type alias annotations.

In `build_docs.py` None is in fact not accepted, so just remove the
optional.

This concludes the patch series started in #10060.
This helps typecheckers disambiguate between value assignments and type
aliases, as described in PEP 613.

Also remove one last `Union` that I somehow missed before.
@sonarqubecloud
Copy link

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 79.94056% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.94%. Comparing base (962ea28) to head (b7cad56).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10123      +/-   ##
==========================================
- Coverage   82.51%   75.94%   -6.58%     
==========================================
  Files         428      429       +1     
  Lines       46261    46410     +149     
  Branches     4137     4162      +25     
==========================================
- Hits        38174    35245    -2929     
- Misses       8087    11165    +3078     
Components Coverage Δ
cvat-ui 77.59% <66.00%> (+0.12%) ⬆️
cvat-server 74.53% <95.31%> (-12.26%) ⬇️
🚀 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.

@cvat-bot cvat-bot bot merged commit 4bd3599 into master Dec 16, 2025
83 of 85 checks passed
@cvat-bot cvat-bot bot deleted the release-2.52.0 branch December 16, 2025 06:09
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.

10 participants