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 3 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.

@@ -3959,6 +3959,33 @@ def test_cannot_export_backup_for_task_without_data(self, tasks):
assert exc.status == HTTPStatus.BAD_REQUEST
assert "Backup of a task without data is not allowed" == exc.body.encode()

def test_can_export_and_import_backup_task_with_cloud_storage(self, tasks):
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add tests for video and 3d data, with and without static chunks? Maybe it will be more convenient to do this in server unit tests.

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.

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.

2 participants