Skip to content

Commit

Permalink
Replaced null value with question mark in edge logs (#44957)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Küttelwesch <[email protected]>
  • Loading branch information
AutomationDev85 and Marco Küttelwesch authored Dec 16, 2024
1 parent b3a384e commit 83da311
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions providers/src/airflow/providers/edge/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
Changelog
---------

0.9.6pre0
.........

Misc
~~~~

* ``Replace null value in log file chunk with question mark to fix exception by pushing log into DB.``

0.9.5pre0
.........

Expand Down
2 changes: 1 addition & 1 deletion providers/src/airflow/providers/edge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

__all__ = ["__version__"]

__version__ = "0.9.5pre0"
__version__ = "0.9.6pre0"

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.10.0"
Expand Down
3 changes: 2 additions & 1 deletion providers/src/airflow/providers/edge/cli/edge_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ def check_running_jobs(self) -> None:
read_data = logfile.read()
job.logsize += len(read_data)
# backslashreplace to keep not decoded characters and not raising exception
log_data = read_data.decode(errors="backslashreplace")
# replace null with question mark to fix issue during DB push
log_data = read_data.decode(errors="backslashreplace").replace("\x00", "\ufffd")
while True:
chunk_data = log_data[:push_log_chunk_size]
log_data = log_data[push_log_chunk_size:]
Expand Down
2 changes: 1 addition & 1 deletion providers/src/airflow/providers/edge/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ source-date-epoch: 1729683247

# note that those versions are maintained by release manager - do not update them manually
versions:
- 0.9.5pre0
- 0.9.6pre0

dependencies:
- apache-airflow>=2.10.0
Expand Down

0 comments on commit 83da311

Please sign in to comment.