[edge] Fixed UnicodeDecodeError during log file upload of Edge worker#43954
Merged
jscheffl merged 3 commits intoapache:mainfrom Nov 13, 2024
Merged
Conversation
31ffdbb to
dc7f2ae
Compare
jscheffl
reviewed
Nov 13, 2024
jscheffl
approved these changes
Nov 13, 2024
ellisms
pushed a commit
to ellisms/airflow
that referenced
this pull request
Nov 13, 2024
…apache#43954) * Fixed seeking issue with none utf-8 signs * Changed version and changelog * Removed hard utf-8 decoding --------- Co-authored-by: Marco Küttelwesch <marco.kuettelwesch@de.bosch.com>
amoghrajesh
pushed a commit
to astronomer/airflow
that referenced
this pull request
Nov 14, 2024
…apache#43954) * Fixed seeking issue with none utf-8 signs * Changed version and changelog * Removed hard utf-8 decoding --------- Co-authored-by: Marco Küttelwesch <marco.kuettelwesch@de.bosch.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Edge worker runs into UnicodeDecodeError exception during log file upload. The Worker reads log file as string and counts number of string characters to seek into the file during uploading next log file part. This can result in mismatch between number of bytes and number of string characters if log file contains none UTF-8 characters. So during upload of next log file part worker can jump between 2 bytes of none utf-8 characters and crashes. Edge worker now uses read bytes to calc place to seek into and decode string as UTF-8 to handle none UTF-8 charaters.
Details about changes