Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup task created from cloud #8972

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Conversation

Eldies
Copy link
Contributor

@Eldies Eldies commented Jan 21, 2025

Motivation and context

Making a backup for tasks/projects created from cloud storage

How has this been tested?

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.

assert not hasattr(self._db_data, 'video'), "Only images can be stored in cloud storage"
media_files = [im.path for im in self._db_data.images.all()]
cloud_storage_instance = db_storage_to_storage_instance(self._db_data.cloud_storage)
with tempfile.TemporaryDirectory() as tmp_dir:
Copy link
Contributor

Choose a reason for hiding this comment

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

Images can be:

  • 2d and 3d
  • raw and archive

There can also be related images. Probably, they are not included.

Please check these cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added tests for video, archives and pdfs with images. Though, as far as I understand, they are downloaded from cloud on task creation and cloud is not needed for them anymore.
Also added tests with and without static chunks.

As far as I understand, right now it is not possible to create a task with 3d images from cloud, and to create a task with related images from cloud. Should I make it possible in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

they are downloaded from cloud on task creation and cloud is not needed for them anymore.

Yes, only bare images can be used remotely so far, everything else is downloaded.

As far as I understand, right now it is not possible to create a task with 3d images from cloud, and to create a task with related images from cloud. Should I make it possible in this PR?

Please keep this PR focused.

@Eldies Eldies requested a review from SpecLad as a code owner February 4, 2025 06:53
@zhiltsov-max
Copy link
Contributor

Please update the changelog

Copy link
Contributor

@zhiltsov-max zhiltsov-max left a comment

Choose a reason for hiding this comment

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

Please make tests pass successfully.

@Eldies Eldies requested a review from nmanovic as a code owner February 4, 2025 11:39
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.89%. Comparing base (cae4e8f) to head (46534f1).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8972      +/-   ##
===========================================
+ Coverage    73.42%   73.89%   +0.47%     
===========================================
  Files          419      428       +9     
  Lines        44351    44516     +165     
  Branches      3875     3875              
===========================================
+ Hits         32563    32897     +334     
+ Misses       11788    11619     -169     
Components Coverage Δ
cvat-ui 77.41% <ø> (+<0.01%) ⬆️
cvat-server 71.00% <100.00%> (+0.89%) ⬆️

Copy link

sonarqubecloud bot commented Feb 4, 2025

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