Skip to content

AIP-72: Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler#61354

Open
henry3260 wants to merge 1 commit intoapache:mainfrom
henry3260:fix-structlog-test-log-handlers
Open

AIP-72: Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler#61354
henry3260 wants to merge 1 commit intoapache:mainfrom
henry3260:fix-structlog-test-log-handlers

Conversation

@henry3260
Copy link
Contributor

@henry3260 henry3260 commented Feb 2, 2026

  • Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler to use structlog-based logging.
  • Replaced ti.log with logging.getLogger(TASK_LOGGER) to access the logger.
  • Directly tested FileTaskHandler by extracting it from logger handlers.
  • Removed @pytest.mark.xfail as the tests now pass with the new logging system.
  • Simplified assertions to match structlog's simpler log format.

closes: #50977

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

…_task_handler to use structlog-based logging.
@henry3260 henry3260 changed the title Updated test_file_task_handler_when_ti_value_is_invalid and test_file… Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler Feb 2, 2026
@henry3260 henry3260 changed the title Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler AIP-72 Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler Feb 2, 2026
@henry3260 henry3260 changed the title AIP-72 Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler AIP-72: Updated test_file_task_handler_when_ti_value_is_invalid and test_file_task_handler Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port TestFileTaskLogHandler tests to new Structlog logs

1 participant