-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
API to download export results #9075
Conversation
/check |
@zhiltsov-max, Could you please check that deprecated API is not used in Human Protocol oracles (and update if needed)? |
cvat/apps/engine/views.py
Outdated
"""), | ||
parameters=[ | ||
# --- Deprecated params section --- |
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.
I think these parameters are removed, not just deprecated.
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.
I did not remove these parameters from the specification because they are still used to determine whether a request is made to export the dataset or just to get raw annotations. So, I think it would be better to remove them from the schema once the endpoint no longer returns a 410 response.
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.
I disagree. By listing these parameters in the schema you are making the claim that they are supported, whereas in fact they are not. I can see the utility in keeping them around for a short while, so that people who read the schema can understand what happened to them; but in this case you should change the description to something accurate, e.g. "this parameter is no longer supported".
FWIW, I also think we should keep the logic that returns 410 if these parameters are present indefinitely, or at least for a long time. It costs very little, and it ensures that clients that use the old API get an error. OTOH, we probably don't need to keep these parameters in the schema for very long.
cvat/apps/engine/tests/utils.py
Outdated
response = self.client.put(url, data=data) | ||
return response | ||
|
||
def _wait_request_to_be_finished( |
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.
It's odd to see this here. IIRC, for unit tests we run RQ jobs in synchronous mode, so no waiting should be necessary - the job should be complete immediately after the initiating request.
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.
it's true, but I believe there are still several advantages of adding a waiting step:
- We do not need to update related tests if we run these tests in asynchronous mode
- This way we test that
/api/requests/rq_id
API returns the expected code (200, 401, 403)
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.
if we run these tests in asynchronous mode
Is it possible?
This way we test that /api/requests/rq_id API returns the expected code (200, 401, 403)
I've nothing against calling this API, I just don't think we need to do it in a loop.
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.
Is it possible?
Warum nicht?
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.
Warum nicht?
Well... how would you do it? AFAICS, cvat.settings.testing
forces all queues to use sync mode. Moreover, it also uses a fake Redis implementation, so it wouldn't be possible to run RQ workers anyway.
9418de4
to
4dee705
Compare
4ef5485
to
5d01bc9
Compare
5d01bc9
to
4b01053
Compare
|
Motivation and context
This PR introduces the following changes:
key
andkey_pattern
args have been removed)How has this been tested?
Checklist
develop
branchTODO:
License
Feel free to contact the maintainers if that's a concern.