Skip to content

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
@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
@notatallshaw-gts
Copy link
Contributor

FWIW, I just tested this now and it did not fix my original issue, I made a follow up issue and will try and prioritize submitting a PR: #58911

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