github-actions[bot] opened a new pull request, #67117:
URL: https://github.com/apache/airflow/pull/67117

   * Redact rendered template fields while still structured to preserve 
nested-key masking on truncation
   
   Generated-by: Claude Opus 4.7 (1M context) following the guidelines at 
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
   
   * Isolate masker patterns in nested-key truncation test
   
   The new test_rendered_templates_mask_nested_keys_with_truncation shares
   the singleton SecretsMasker with earlier tests in the file. One of those
   (test_get_connection_from_context) fetches a connection whose password
   fixture value happens to be the literal string "password", which the SDK
   runtime registers as a regex mask via mask_secret(). When the new test
   runs after it, that regex substitutes the literal token "password"
   inside str(redacted) -- including the dict KEY name -- so the assertion
   "'password': '***'" fails because the key itself is also masked.
   
   Reset patterns/replacer for the test via monkeypatch (auto-restored on
   teardown) so the assertion isolates value-masking (the behavior under
   test) from key-token replacement (a side effect of leaked patterns).
   (cherry picked from commit 4ceb0db321e2f716f326e3f1ccf82387992da121)
   
   Co-authored-by: Jarek Potiuk <[email protected]>


-- 
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]

Reply via email to