ccoliu opened a new pull request, #73718: URL: https://github.com/apache/airflow/pull/73718
`merge_dicts` recursed whenever dict2's value was a dict, without checking that dict1's value for the same key was also a dict. When it wasn't, the merge crashed instead of letting dict2's value win, as the docstring promises: - scalar or `None` in dict1 → `AttributeError: '...' object has no attribute 'copy'` - list in dict1 → `TypeError: list indices must be integers or slices, not str` Now it only recurses when both values are dicts; otherwise dict2's value overwrites dict1's. Behavior for all previously working inputs is unchanged. Tests: added cases for int / str / `None` / list values being overwritten by a dict (all four fail without the fix), plus a case locking in the existing dict-overwritten-by-scalar behavior. closes: #73714 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Claude Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
