Skip to content

Guard RedactUrlQueryParamsFilter against None args - #947

Merged
vikrantpuppala merged 1 commit into
databricks:mainfrom
jonathanberthias:fix-redact-filter-none-args
Sep 24, 2026
Merged

vikrantpuppala merged 1 commit into
databricks:mainfrom
jonathanberthias:fix-redact-filter-none-args

Conversation

@jonathanberthias

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Other

Description

urllib3.connectionpool records can arrive with record.args set to None when another logging filter (e.g. MLflow's SensitiveQueryParamFilter) redacts the message and nulls args before this filter runs. Iterating None raised TypeError. Guard the tuple branch with an explicit None check.

Also fix a typo in the dict-args branch: record.arg[k] should be record.args[k], which would raise AttributeError whenever a record carried dict args.

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

Fixes #946

urllib3.connectionpool records can arrive with record.args set to None when another logging filter (e.g. MLflow's SensitiveQueryParamFilter) redacts the message and nulls args before this filter runs. Iterating None raised TypeError. Guard the tuple branch with an explicit None check.

Also fix a latent typo in the dict-args branch: record.arg[k] should be record.args[k], which would raise AttributeError whenever a record carried dict args.

Fixes databricks#946

Signed-off-by: Jonathan Berthias <jvberthias@gmail.com>
@vikrantpuppala vikrantpuppala added the kernel-e2e Trigger preview run of the Kernel E2E workflow on this PR label Sep 24, 2026
@vikrantpuppala
vikrantpuppala merged commit f0ef715 into databricks:main Sep 24, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel-e2e Trigger preview run of the Kernel E2E workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RedactUrlQueryParamsFilter crashes with TypeError: NoneType is not iterable when MLflow's urllib3 filter runs first

2 participants