This is an automated email from the ASF dual-hosted git repository.
amoghrajesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8ef95e77a62 Fix flaky secrets masking test in LLMRetryPolicy (#70823)
8ef95e77a62 is described below
commit 8ef95e77a629611794cc7bffa1183f6ebe7004cf
Author: Amogh Desai <[email protected]>
AuthorDate: Fri Jul 31 16:56:38 2026 +0530
Fix flaky secrets masking test in LLMRetryPolicy (#70823)
---
providers/common/ai/tests/unit/common/ai/policies/test_retry.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
b/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
index 5223e883ff7..6175938e07a 100644
--- a/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
+++ b/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
@@ -29,6 +29,7 @@ from airflow.providers.common.ai.policies.retry import (
ErrorClassification,
LLMRetryPolicy,
)
+from airflow.sdk._shared.secrets_masker import reset_secrets_masker
from airflow.sdk.definitions.retry_policy import RetryAction, RetryRule
from airflow.sdk.log import mask_secret
@@ -112,6 +113,7 @@ class TestLLMClassifyDecisions:
@pytest.mark.enable_redact
@patch("airflow.providers.common.ai.hooks.pydantic_ai.PydanticAIHook",
autospec=True)
def test_prompt_redacts_known_secrets(self, mock_hook_cls):
+ reset_secrets_masker()
secret_value = "super-secret-conn-password"
mask_secret(secret_value)
@@ -135,7 +137,7 @@ class TestLLMClassifyDecisions:
@pytest.mark.enable_redact
@patch("airflow.providers.common.ai.hooks.pydantic_ai.PydanticAIHook",
autospec=True)
def test_prompt_keeps_raw_message_when_redaction_disabled(self,
mock_hook_cls):
-
+ reset_secrets_masker()
secret_value = "super-secret-conn-password"
mask_secret(secret_value)