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

Fixed resources import #5909

Merged
merged 86 commits into from
Jun 2, 2023
Merged

Fixed resources import #5909

merged 86 commits into from
Jun 2, 2023

Conversation

Marishka17
Copy link
Contributor

@Marishka17 Marishka17 commented Mar 22, 2023

Motivation and context

Fixed:

  • wrong location of tmp file when importing job annotations
  •   File "/home/maya/Documents/cvat/.env/lib/python3.8/site-packages/rq/worker.py", line 795, in work
        self.execute_job(job, queue)
      File "/home/maya/Documents/cvat/cvat/rqworker.py", line 37, in execute_job
        return self.perform_job(*args, **kwargs)
      File "/home/maya/Documents/cvat/.env/lib/python3.8/site-packages/rq/worker.py", line 1389, in perform_job
        self.handle_exception(job, *exc_info)
      File "/home/maya/Documents/cvat/.env/lib/python3.8/site-packages/rq/worker.py", line 1438, in handle_exception
        fallthrough = handler(job, *exc_info)
      File "/home/maya/Documents/cvat/cvat/apps/engine/views.py", line 2233, in rq_exception_handler
        rq_job.exc_info = "".join(
    AttributeError: can't set attribute
    

Resolves #5773
Resolves #5563

  • root causes of the issues:
    • the annotation file was uploaded to the server by tus protocol and rq job was created but no one next requests for checking status were not made. (e.g. user closed the browser tab)
    • the annotation file was uploaded to the server by tus protocol but rq job has not yet been created (e.g cvat instance restarted)
    • tasks/projects creation from backups with the same name at the same time by different users

How has this been tested?

Manually

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
    - [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

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.

@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2023

❌ Some checks failed
📄 See logs here

@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2023

❌ Some checks failed
📄 See logs here

@zhiltsov-max
Copy link
Contributor

@Marishka17, AFAIK, the problem is also actual for interrupted backup uploads.

@Marishka17
Copy link
Contributor Author

Marishka17 commented Mar 24, 2023

AFAIK, the problem is also actual for interrupted backup uploads.

@zhiltsov-max, Yes, I know, this PR should fix that too.

@cvat-ai cvat-ai deleted a comment from github-actions bot Mar 24, 2023
@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2023

❌ Some checks failed
📄 See logs here

@nmanovic nmanovic requested review from SpecLad and removed request for zhiltsov-max, bsekachev and nmanovic March 27, 2023 09:40
tests/python/rest_api/test_tasks.py Outdated Show resolved Hide resolved
tests/python/rest_api/test_tasks.py Outdated Show resolved Hide resolved
supervisord/utils.conf Show resolved Hide resolved
cvat/settings/base.py Outdated Show resolved Hide resolved
task.import_annotations(self.format, filename)
self._check_annotations(task_id)

@pytest.mark.timeout(70)
Copy link
Contributor

@zhiltsov-max zhiltsov-max May 29, 2023

Choose a reason for hiding this comment

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

Probably, it makes sense to reduce the delay down to a couple of seconds. We totally don't want unit tests running more than a minute, unless they are in a special test suite.

@SpecLad
Copy link
Contributor

SpecLad commented Jun 1, 2023

Please resolve merge conflicts and add a changelog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants