1fanwang commented on issue #70953:
URL: https://github.com/apache/airflow/issues/70953#issuecomment-5186663635

   Verified [Validate ProduceToTopicOperator topic after 
rendering](https://github.com/apache/airflow/pull/70333) on `apache-kafka 
1.15.1rc1`. Works as intended.
   
   Airflow 3.3.0, two identical virtualenvs: one with the RC providers, one 
with the previous stable release. Same Dag, same command, run through the real 
task runner. The external transport is stubbed, and the stub asserts the value 
that actually reaches it.
   
   A `ProduceToTopicOperator` whose `topic` renders to an empty string, which 
is the case worth catching. The stubbed producer prints the topic it was 
actually given.
   
   ```bash
   # apache-kafka 1.15.1rc1
   AIRFLOW_HOME=$PWD/airflow_home \
   AIRFLOW__CORE__DAGS_FOLDER=$PWD/dags_e2e/rc_70333_kafka_topic \
     .venv/bin/airflow dags test rc_70333_kafka_topic
   
   # apache-kafka 1.15.0, identical Dag
   AIRFLOW_HOME=$PWD/airflow_home_prev \
   AIRFLOW__CORE__DAGS_FOLDER=$PWD/dags_e2e/rc_70333_kafka_topic \
     .venv-prev/bin/airflow dags test rc_70333_kafka_topic
   ```
   
   ```
   # apache-kafka 1.15.1rc1, refuses to produce
   AirflowException: topic and producer_function must be provided. Got topic= 
and producer_function=...
   state=failed
   
   # apache-kafka 1.15.0, produces to an unnamed topic and reports success
   PRODUCED_TO_TOPIC=''  <-- reached the broker
   state=success
   ```
   
   Note that the RC failing here is the fix. The previous release wrote to an 
empty topic and called it a success.


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