-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Project backups #3852
Project backups #3852
Conversation
80f30a2
to
03b14d4
Compare
@azhavoro , could you please add CHANGELOG? Please add some screenshots into the description of the PR as well, summarize changes which were done. It will help me in the future to prepare the next release and also understand changes not from code but from the description. |
@azhavoro , it looks really good. I found two problems:
|
|
Could not reproduce with new projects |
@azhavoro , could you please resolve conflicts? |
@@ -21,7 +21,7 @@ class TokenAuthentication(_TokenAuthentication): | |||
def authenticate(self, request): | |||
auth = super().authenticate(request) | |||
session = getattr(request, 'session') | |||
if auth is not None and session.session_key is None: | |||
if auth is not None and (session.session_key is None or (not session.modified and not session.load())): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azhavoro , could you please put here some comments to understand these changes.
return backup.export(db_project, request) | ||
|
||
@action(detail=False, methods=['POST']) | ||
def backup(self, request, pk=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azhavoro , It looks like instead of POST /api/v1/tasks/backup
we should have POST /api/v1/tasks
with a corresponding data type. Also I don't like that for projects we create an empty project and after that import a dataset and for backup with have another approach. For creating tasks we have also two steps: create a tasks and send data after that.
Let's keep it as is for now and try to find a common solution later
@Marishka17 , please look at the inconsistency. It is something which we need to solve during REST API redesign.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation and context
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.