fIx failing masking tests for python < 3.10#27337
Conversation
Seems that the number of times user is printed in stack trace depend on Python version. The fix in apache#27335 seems to only have worked for Python 3.10 with the 1.0.0 of exceptiongroup the stack trace has less stack levels.
|
Running for "full tests" and with change in setup.py to get latest version of exceptiongroup - apparently the test results sligthly differ for different Python version |
|
just the trino case (which means BTW it is not question of resources - just race) |
|
Finally I could reproduce this error locally. I do not know about actual nature of this error but what I found
root@4b131dd73f72:/opt/airflow# pipdeptree --reverse --packages exceptiongroup --python `which python`
exceptiongroup==1.0.0rc9
- cattrs==22.2.0 [requires: exceptiongroup]
- apache-airflow==2.5.0.dev0 [requires: cattrs>=22.1.0]
- looker-sdk==22.18.0 [requires: cattrs>=1.3] |
|
Yeah. it's weird but eventually i think the approach i used works fine. We really do not care how many details and levels are in the stack trace we just care that password is not leaked. And checking that there is no plain password and that there are some 'masked' passwords (and more thab one in this case) is 'good enough' I think |
|
I think what really happens here is that sometimes we have one less exception in the chain because some of the monkey patching is done earlier or later (and it does not really matter) - but this is not something we should care about in this test - we just care about masking implicit passwords in stack trace |
|
BTW. We got the main "green" again :) 🎉 |
Seems that the number of times user is printed in stack trace depend on Python version. The fix in #27335 seems to only have worked for Python 3.10 with the 1.0.0 of exceptiongroup the stack trace has less stack levels.
^ 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.