karenbraganz opened a new issue, #47702:
URL: https://github.com/apache/airflow/issues/47702

   ### Apache Airflow Provider(s)
   
   cncf-kubernetes
   
   ### Versions of Apache Airflow Providers
   
   10.0.1
   
   ### Apache Airflow version
   
   2.10.5
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   The `executor_config` dictionary used to configure worker pods with the 
Kubernetes executor does not raise an error if any keys besides "pod_override" 
or "pod_template_file" are used. Even with invalid keys, the DAG is imported 
and will run as expected. The invalid `executor_config` will simply be 
disregarded.
   
   ### What you think should happen instead
   
   If any keys besides "pod_override" or "pod_template_file" are used in 
`executor_config`, and error (maybe a DAG import error) should be raised. 
   
   This should give the user feedback that their `executor_config` keys are 
invalid and need to be removed or changed.
   
   ### How to reproduce
   
   1. Create an Airflow instance that uses the Kubernetes Executor.
   2. Create a DAG with the following code including an invalid key in 
`executor_config`.
   ```
   import datetime
   
   from airflow.decorators import dag
   from airflow.decorators import task
   
   executor_config = {
       "key": "value"
   }
   
   @dag(start_date=datetime.datetime(2024, 10, 1), schedule="@daily", 
catchup=False)
   def dag_1():
   
       @task(executor_config=executor_config)
       def task_1():
           print("task 1")
   
       task_1()
   
   dag_1()
   ```
   3. Observe that the DAG will be imported and run on the Airflow instance 
without any issues. 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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]

Reply via email to