HsiuChuanHsu commented on code in PR #53598:
URL: https://github.com/apache/airflow/pull/53598#discussion_r2236523609
##########
kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py:
##########
@@ -1428,6 +1429,55 @@ def test_init_container_logs_filtered(self,
mock_get_connection):
< calls_args.find(marker_from_main_container)
)
+ @pytest.mark.parametrize(
+ "log_prefix_enabled, log_formatter, expected_log_message_check",
+ [
+ pytest.param(
+ True,
+ None,
+ lambda marker, record_message: f"[base] {marker}" in
record_message,
+ id="log_prefix_enabled",
+ ),
+ pytest.param(
+ False,
+ None,
+ lambda marker, record_message: marker in record_message and
"[base]" not in record_message,
+ id="log_prefix_disabled",
+ ),
+ pytest.param(
+ False, # Ignored when log_formatter is provided
+ lambda container_name, message: f"CUSTOM[{container_name}]:
{message}",
+ lambda marker, record_message: f"CUSTOM[base]: {marker}" in
record_message,
+ id="custom_log_formatter",
+ ),
+ ],
+ )
+ def test_log_output_configurations(
+ self, mock_get_connection, caplog, log_prefix_enabled, log_formatter,
expected_log_message_check
Review Comment:
I have noticed the failed CI, but i have no idea how to fix the error in the
first place.😠I think i can figure this out!
--
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]