johnhoran opened a new issue, #59366:
URL: https://github.com/apache/airflow/issues/59366
### Apache Airflow Provider(s)
cncf-kubernetes
### Versions of Apache Airflow Providers
_No response_
### Apache Airflow version
2.11
### Operating System
linux
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### What happened
I constructed a fairly simple dag
```python
"""Example DAG demonstrating the use of the KubernetesPodOperator."""
from datetime import datetime, timedelta
from airflow import DAG
from airflow.providers.cncf.kubernetes.operators.pod import
KubernetesPodOperator
from airflow.providers.cncf.kubernetes.callbacks import
KubernetesPodOperatorCallback
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from airflow.providers.cncf.kubernetes.callbacks import client_type
class MyCallback(KubernetesPodOperatorCallback):
@classmethod
def progress_callback(cls, *, line: str, client: "client_type", mode:
str, **kwargs) -> None:
print(">>>" + line)
with DAG(
dag_id="example_kubernetes_operator",
schedule=None,
start_date=datetime(2021, 1, 1),
tags=["example"],
doc_md=__doc__,
dagrun_timeout=timedelta(minutes=60),
) as dag:
k = KubernetesPodOperator(
image="ubuntu:16.04",
cmds=["bash", "-cx"],
arguments=["for i in {1..20}; do echo \"Hi $i\"; sleep 1; done"],
labels={"foo": "bar"},
name="airflow-test-pod",
task_id="task",
# deferrable=True,
# logging_interval=2,
callbacks=MyCallback
)
```
From this I expect to see both the log lines from KPO as well as the lines
repeated from my print statement in the callback, but instead I get the regular
KPO output and then the same line repeated over and over
`>>>2025-12-12T13:14:33.549732798Z + for i in '{1..20}'`, which was the first
line from KPO.
I tried going back to older versions thinking a bug had been introduced
somewhere, but I went all the way back to
"apache-airflow-providers-cncf-kubernetes==7.14.0", and still couldn't get
proper output.
### What you think should happen instead
_No response_
### How to reproduce
-
### Anything else
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]