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

Remove worrying log message about redaction caused by OpenLineage plugin #31149

Conversation

ashb
Copy link
Member

@ashb ashb commented May 9, 2023

The current published plugin calls _redact_all directly, so when we
added the max_depth parameter in 2.6 (precisely so it didn't need to
call this private function directly!) we broke that.

This change leads to some worrying logs appearing in task logs for
anyone with the plugin installed:

[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact NoneError was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'

This patch makes that previous change backwards compatible for that with
no change in behaviour for new code.


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

The current published plugin calls `_redact_all` directly, so when we
added the `max_depth` parameter in 2.6 (precisely so it didn't need to
call this private function directly!) we broke that.

This change leads to some worrying logs appearing in task logs for
anyone with the plugin installed:

```
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact NoneError was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
```

This patch makes that previous change backwards compatible for that with
no change in behaviour for new code.
@ashb ashb added this to the Airflow 2.6.1 milestone May 9, 2023
@ashb ashb added the type:bug-fix Changelog: Bug Fixes label May 9, 2023
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a timeline we could remove this default? We could add this to the comment so to remove the default when we can.

@ashb
Copy link
Member Author

ashb commented May 9, 2023

Good call @uranusjr -- added a TODO to look at it in "early 2024".

@ephraimbuddy ephraimbuddy merged commit 25e3159 into apache:main May 9, 2023
@ashb
Copy link
Member Author

ashb commented May 9, 2023

Oops - Github issue means that my update commit didn't "take" (GH didn't see the push). Not the end of the world here.

ephraimbuddy pushed a commit that referenced this pull request May 9, 2023
…in (#31149)

The current published plugin calls `_redact_all` directly, so when we
added the `max_depth` parameter in 2.6 (precisely so it didn't need to
call this private function directly!) we broke that.

This change leads to some worrying logs appearing in task logs for
anyone with the plugin installed:

```
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact []Error was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
[2023-05-05, 11:56:17 BST] {utils.py:490} WARNING - Unable to redact NoneError was: TypeError: SecretsMasker._redact_all() missing 1 required positional argument: 'max_depth'
```

This patch makes that previous change backwards compatible for that with
no change in behaviour for new code.

(cherry picked from commit 25e3159)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants