Skip to content

Fix issue with using the various state enum value in logs#33065

Merged
ephraimbuddy merged 4 commits into
apache:mainfrom
astronomer:redact-state-enum
Aug 3, 2023
Merged

Fix issue with using the various state enum value in logs#33065
ephraimbuddy merged 4 commits into
apache:mainfrom
astronomer:redact-state-enum

Conversation

@ephraimbuddy

Copy link
Copy Markdown
Contributor

The secrets masker is unable to work on the various state enums: DagRunState, TaskInstanceState, JobState, and State enums in logs.
This PR fixes this by converting the enums to strings during the secrets mask search

closes: #33061

The secrets masker is unable to work on the various state enums: DagRunState, TaskInstanceState,
JobState, and State enums in logs.
This PR fixes this by converting the enums to strings during the secrets mask search
Comment thread airflow/utils/log/secrets_masker.py Outdated

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch!

@potiuk potiuk added this to the Airflow 2.7.0 milestone Aug 3, 2023
@hussein-awala hussein-awala added the type:bug-fix Changelog: Bug Fixes label Aug 3, 2023
@ephraimbuddy
ephraimbuddy merged commit b0f61be into apache:main Aug 3, 2023
@ephraimbuddy
ephraimbuddy deleted the redact-state-enum branch August 3, 2023 13:30
@hussein-awala hussein-awala mentioned this pull request Aug 3, 2023
2 tasks
ephraimbuddy added a commit that referenced this pull request Aug 3, 2023
* Fix issue with using the various state enum value in logs

The secrets masker is unable to work on the various state enums: DagRunState, TaskInstanceState,
JobState, and State enums in logs.
This PR fixes this by converting the enums to strings during the secrets mask search

* fixup! Fix issue with using the various state enum value in logs

* apply to all enum

* test with custom enum

(cherry picked from commit b0f61be)
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.

TriggerDagRunOperator DAG task log showing Warning: Unable to redact <DagRunState.SUCCESS: 'success'>

4 participants