sreecharan-desu opened a new pull request, #77792:
URL: https://github.com/apache/airflow/pull/77792

   closes: #59319
   
   `dag.test(use_executor=...)` and `airflow dags test --use-executor` had no 
end to end coverage, so a change that drops the flag still exits 0 and nothing 
notices. This builds on #68614.
   
   The new e2e test runs a small paused Dag four ways (CLI and `dag.test()`, 
each with and without the executor) from the scheduler container. It then 
checks the task instance `hostname` and the returned `socket.gethostname()`: 
with the executor the task has to run on the worker, without it on the 
scheduler.
   
   How I tested
   
   Against `apache/airflow:3.4.0-python3.12` (the main prod image on ghcr is 
from Dec 2024):
   
   ```
   4 passed in 59.40s
   ```
   
   Then I set `use_executor=False` in `dag_command.py` to check the test 
catches it:
   
   ```
   FAILED ...[cli-use-executor] - assert '8faa11caefa2' == '68d6b7f24689'
   ```
   
   ---
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: an AI coding assistant, reviewed and tested by me, following 
[the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   used an AI coding assistant to help with parts of this, but i went through 
every change myself, understand the code and tested it locally.
   


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