-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix typo in error stack trace formatting for clearer output #42017
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 typo in error stack trace formatting for clearer output #42017
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
|
@kacpermuda could you please comment on that? I can see you made current join in #39813 |
|
Hey @aboitreaud , thanks for the PR ! Apart from the problem you described with the formatting, you are not passing the exception object anymore to the formatting func. I'm thinking if there possibly is some edge case, where we the last exception raised is not the one that we have here in the adapter. Have you considered it here? |
uranusjr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change the error message? If so, can we include a comparison between old and new outputs in this PR?
|
Hi @kacpermuda and @uranusjr and thanks for your comments! However, I don't think that joining on "\n" is necessary, here is of what the stack trace would look like:
|
|
@uranusjr could I please also get your approval following Kacper's please ? |
|
👊 Gentle bump here @uranusjr @mobuchowski, could I get a code owner review please ? |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
…2017) * Use format_exc * Moving back to format_exception
Fix a typo in error stack trace formatting by replacing "\\n" joins with
traceback.format_exc(). The previous implementation used "\\n" to join lines, resulting in "\n" printed at the beginning of the lines. Fixing it by joining on "\n" would just add unnecessary line breaks and extra spacing in the stack trace. Since traceback functions already handle line breaks, this fix ensures proper formatting without redundant joins.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.