You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/14 07:44:00 UTC

[jira] [Commented] (AIRFLOW-7060) EXECUTOR variable don't work in airflow.cfg in breeze shell

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

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

zeroam commented on pull request #7719: [AIRFLOW-7060] remove environment value AIRFLOW__CORE__EXECUTOR in backend-sqlite.yml
URL: https://github.com/apache/airflow/pull/7719
 
 
   Because the default breeze environment set `AIRFLOW_CORE_EXECUTOR` to `SequentialExecutor`, I can't change it to 'CeleryExecutor' through  airflow.cfg.
   
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [ ] Description above provides context of the change
   - [ ] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


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