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

Task status sometimes can fail with empty message #5215

Closed
zhiltsov-max opened this issue Nov 1, 2022 · 0 comments · Fixed by #5216
Closed

Task status sometimes can fail with empty message #5215

zhiltsov-max opened this issue Nov 1, 2022 · 0 comments · Fixed by #5216
Assignees
Labels
bug Something isn't working server

Comments

@zhiltsov-max
Copy link
Contributor

In some cases /api/tasks/{id}/status can fail with empty message:

Status Code: 400
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Allow': 'GET, HEAD, OPTIONS', 'Content-Length': '43', 'Content-Type': 'application/vnd.cvat+json', 'Date': 'Sat, 29 Oct 2022 10:29:58 GMT', 'Referrer-Policy': 'same-origin', 'Server': 'Apache', 'Vary': 'Accept,Origin', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY'})
HTTP response body: {"message":["This field may not be null."]}

Example: https://github.com/opencv/cvat/actions/runs/3351000637/jobs/5552234641

@zhiltsov-max zhiltsov-max added bug Something isn't working help wanted server labels Nov 1, 2022
nmanovic pushed a commit that referenced this issue Dec 3, 2022
Fixes #5215

It's not really clear how the error can be obtained, but this PR adds a
workaround for the problem. There are 2 possible ways to get the
`message` parameter - from an error and from the operation status.

- Our status messages are always represented by a string, no any other
values is assigned.

- rq is trickier here - it receives rq data and [decodes
it](https://github.com/rq/rq/blob/master/rq/job.py#L603-L609) if there
is an error, but the operations can leave None as the `exc_info` value.
Maybe [this issue](rq/rq#1633) is relevant
here.
mikhail-treskin pushed a commit to retailnext/cvat that referenced this issue Jul 1, 2023
Fixes cvat-ai#5215

It's not really clear how the error can be obtained, but this PR adds a
workaround for the problem. There are 2 possible ways to get the
`message` parameter - from an error and from the operation status.

- Our status messages are always represented by a string, no any other
values is assigned.

- rq is trickier here - it receives rq data and [decodes
it](https://github.com/rq/rq/blob/master/rq/job.py#L603-L609) if there
is an error, but the operations can leave None as the `exc_info` value.
Maybe [this issue](rq/rq#1633) is relevant
here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant