-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
SyncRemoteRepository (PublicTask) fail when an Exception is raised #4077
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
Comments
This is already fixed in #4078 with one solution but it's not the best: to be able to get |
Got this too, any idea on where the EncodeError comes from? Also this #4078 applied we have the /api/v2/jobs/status/ still returning this:
|
@xrmx yes. The problem is with Celery 4 (it didn't happen with Celery 3) and it's because we try to encode the exception inside the task data. The PR linked in my previous comment fixes the problem in one way. Not the best one, though. |
I'll take a look at this after #4656 |
Ok, I just saw the linked issue celery/kombu#868 and the PR #4078 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is pretty old and we are not facing this issue anymore. |
Uh oh!
There was an error while loading. Please reload this page.
PublicTask
is used to run a Celery Task and communicate the result to the FE. When the result is anException
we are having anEncodeError
since the exception is not being able to be encoded properly bykombu
:This error happens at https://github.com/rtfd/readthedocs.org/blob/eb6dd0b3ddf0c8dee32f0aa7c617eeaa78373e4f/readthedocs/core/utils/tasks/public.py#L83 when the
info['error']
is populated.(I found this by debugging for a while, the original exception that I saw was at https://github.com/rtfd/readthedocs.org/blob/eb6dd0b3ddf0c8dee32f0aa7c617eeaa78373e4f/readthedocs/core/utils/tasks/retrieve.py#L28 saying that
EncodeError
is not iterable)I'm almost sure that this start happening when we upgrade to Celery 4 and the default serializer became
json
.To reproduce this,
runserver
with celery (ALWAYS_EAGER=False
)GithubService.sync
methodRelated: #4076
Related: https://github.com/readthedocs/readthedocs-corporate/issues/323
Reported upstream: celery/kombu#573 (comment)
The text was updated successfully, but these errors were encountered: