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

Fix logs with leading spaces in the Docker operator (#33692) #43840

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

mrk-andreev
Copy link
Contributor

@mrk-andreev mrk-andreev commented Nov 9, 2024

Python 3.11’s multi-line error arrows don’t display correctly in Airflow’s DockerOperator logs due to leading spaces being removed, making error messages hard to read.

Before fix:

return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^

After fix:

return self.main(*args, **kwargs)
       ^^^^^^^^^^^^^^^^

Fixes: #33692

@potiuk
Copy link
Member

potiuk commented Nov 9, 2024

It could be great to use 'Fixes: #PR` to close PR after it's merged.

related: #33692

cc: @potiuk

Please describe in commit message what it is about -linking to issues does not leave trace in commit history.

@potiuk
Copy link
Member

potiuk commented Nov 9, 2024

Can you please just improve the commit message. It's ready to go otherwise

Python 3.11’s multi-line error arrows don’t display correctly in Airflow’s DockerOperator logs due to leading spaces being removed, making error messages hard to read.

Before fix:
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^

After fix:
return self.main(*args, **kwargs)
       ^^^^^^^^^^^^^^^^

Fixes: apache#33692
@mrk-andreev mrk-andreev changed the title Fix left trailing space logs for docker operator (#33692) Fix logs with leading spaces in the Docker operator (#33692) Nov 9, 2024
@potiuk potiuk merged commit 74bc872 into apache:main Nov 9, 2024
56 checks passed
@notatallshaw-gts
Copy link
Contributor

Thanks for fixing this! And sorry I was never able to prioritize raising a PR, my local patch of Airflow uses the same method to solve this.

ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
…pache#43840)

Python 3.11’s multi-line error arrows don’t display correctly in Airflow’s DockerOperator logs due to leading spaces being removed, making error messages hard to read.

Before fix:
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^

After fix:
return self.main(*args, **kwargs)
       ^^^^^^^^^^^^^^^^

Fixes: apache#33692
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
…pache#43840)

Python 3.11’s multi-line error arrows don’t display correctly in Airflow’s DockerOperator logs due to leading spaces being removed, making error messages hard to read.

Before fix:
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^

After fix:
return self.main(*args, **kwargs)
       ^^^^^^^^^^^^^^^^

Fixes: apache#33692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceptions become a mess in logs using a Python 3.11 docker operator
3 participants