[ 
https://issues.apache.org/jira/browse/AIRFLOW-7060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17068159#comment-17068159
 ] 

ASF GitHub Bot commented on AIRFLOW-7060:
-----------------------------------------

zeroam commented on pull request #7719: [AIRFLOW-7060] executor variable don't 
work in airflow.cfg in breeze shell
URL: https://github.com/apache/airflow/pull/7719
 
 
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> EXECUTOR variable don't work in airflow.cfg in breeze shell
> -----------------------------------------------------------
>
>                 Key: AIRFLOW-7060
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-7060
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: celery, cli
>    Affects Versions: 2.0.0
>            Reporter: JeonChangWon
>            Assignee: JeonChangWon
>            Priority: Major
>              Labels: pull-request-available
>
> Because the default breeze environment set `AIRFLOW__CORE__EXECUTOR` to 
> `SequentialExecutor`, I can't change it to 'CeleryExecutor' through  
> airflow.cfg. 
> Problem 1:
> When I execute the command `airflow celery` in the breeze default 
> environment, an error occurred. Because the `celery` command is added 
> dynamically when the executor is set to CeleryExecutor by airflow.cfg.
> {code:java}
> if conf.get("core", "EXECUTOR") == ExecutorLoader.CELERY_EXECUTOR or 
> BUILD_DOCS: ...{code}
>  
> So, I changed airflow.cfg file from SequentialExecutor to CeleryExecutor.
> but above error still exist because of the environment variable 
> `AIRFLOW__CORE__EXECUTOR` which is set to "SequentialExecutor" by 
> 'backend-sqlite.yml' file
>  
> Problem 2:
> In addition,   the below error can occur after I changed
> `AIRFLOW__CORE__EXECUTOR` to "CeleryExecutor" because "Celery Executor" don't 
> use sqlite.
> {code:java}
> Traceback (most recent call last): File "/usr/local/bin/airflow", line 7, in 
> <module> exec(compile(f.read(), __file__, 'exec')) File 
> "/opt/airflow/airflow/bin/airflow", line 26, in <module> from airflow.bin.cli 
> import CLIFactory File "/opt/airflow/airflow/__init__.py", line 34, in 
> <module> from airflow import settings File 
> "/opt/airflow/airflow/settings.py", line 34, in <module> from 
> airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf # NOQA F401 
> File "/opt/airflow/airflow/configuration.py", line 602, in <module> 
> conf.read(AIRFLOW_CONFIG) File "/opt/airflow/airflow/configuration.py", line 
> 309, in read self._validate() File "/opt/airflow/airflow/configuration.py", 
> line 185, in _validate self.get('core', 'executor'))) 
> airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the 
> CeleryExecutor{code}
>  
> Solution 2:
>  
> I execute breeze command with an option like 
> {code:java}
> ./breeze -i redis -b postgres{code}
> And change airflow.cfg SequentialExecutor to CeleryExecutor.
> I finally could use the celery command and the celery worker works well.
>  
>  
> I will send PR for Problem 1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to