[tyr-worker] feat: trying to avoid 'logs forwarding' to fail the entire process #3884
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let's try to protect us against any failure triggered by the log forwarding. Note that this PR is a best effort, but probably doesn't fix https://navitia.atlassian.net/browse/NAV-1653.
About the original ticket, after more searching, we think we now have a good explanation of what is going on (but it's hard to verify for sure).
The best hypothesis is:
.decode
operation per chunks (callingread_async()
and therefore.read()
)é
and one of the chunk ends with only half of one of this multi-byte characters[...]donn\xc3', 4095, 4096, 'unexpected end of data')
\xc3
is missing something to representdonnées
(in the logs, we have a full version of it a line abovedonn\xc3\xa9es
)If the hypothesis is correct, then #3880 should have already fixed the problem. But this PR should also prevent a bit more.