You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jorge Machado (Jira)" <ji...@apache.org> on 2021/03/05 20:57:00 UTC

[jira] [Commented] (AIRFLOW-5655) Incorrect capitalization of env var causes task start to fail

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

Jorge Machado commented on AIRFLOW-5655:
----------------------------------------

I'm getting the same issue. 
{code:java}
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/task/task_runner/standard_task_runner.py", line 37, in __init__
super(StandardTaskRunner, self).__init__(local_task_job)
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/task/task_runner/base_task_runner.py", line 91, in __init__
include_cmds=False)
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/configuration.py", line 35, in tmp_configuration_copy
cfg_dict = conf.as_dict(display_sensitive=True, raw=True)
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", line 562, in as_dict
opt = opt.replace('%', '%%')
AttributeError: 'NoneType' object has no attribute 'replace'
[2021-03-05 20:53:49,697: ERROR/ForkPoolWorker-1] execute_command encountered a CalledProcessError
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/airflow/executors/celery_executor.py", line 78, in execute_command
close_fds=True, env=env)
File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
{code}
Use helm chart  7.16.0

> Incorrect capitalization of env var causes task start to fail
> -------------------------------------------------------------
>
>                 Key: AIRFLOW-5655
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5655
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.10.4
>         Environment: Tested on Linux (Ubuntu xenial)
>            Reporter: Marius Shekow
>            Priority: Major
>
> Suppose you define an environment variable such as
> {code:java}
> AIRFLOW__SMTP__SMTP_port=25{code}
> where PORT was accidentally written in lower-case. When running "airflow scheduler" this will cause the following stack-trace, which is not indicative of the cause.
> {noformat}
> [2019-10-14 13:32:23,666] {cli.py:516} {cli.py:516} INFO - Running <TaskInstance: example_bash_operator.run_this_last 2019-10-13T00:00:00+00:00 [queued]> on host ubuntu-xenial
> Traceback (most recent call last):
>   File "/usr/local/bin/airflow", line 32, in <module>
>     args.func(args)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/utils/cli.py", line 74, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/bin/cli.py", line 522, in run
>     _run(args, dag, ti)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/bin/cli.py", line 435, in _run
>     run_job.run()
>   File "/usr/local/lib/python3.5/dist-packages/airflow/jobs/base_job.py", line 213, in run
>     self._execute()
>   File "/usr/local/lib/python3.5/dist-packages/airflow/jobs/local_task_job.py", line 75, in _execute
>     self.task_runner = get_task_runner(self)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/task/task_runner/__init__.py", line 38, in get_task_runner
>     return StandardTaskRunner(local_task_job)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/task/task_runner/standard_task_runner.py", line 31, in __init__
>     super(StandardTaskRunner, self).__init__(local_task_job)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/task/task_runner/base_task_runner.py", line 93, in __init__
>     include_cmds=False)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/utils/configuration.py", line 35, in tmp_configuration_copy
>     cfg_dict = conf.as_dict(display_sensitive=True, raw=True)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/configuration.py", line 436, in as_dict
>     opt = opt.replace('%', '%%')
> AttributeError: 'NoneType' object has no attribute 'replace'
> [2019-10-14 13:32:23,864] {sequential_executor.py:52} ERROR - Failed to execute task Command '['airflow', 'run', 'example_bash_operator', 'run_this_last', '2019-10-13T00:00:00+00:00', '--local', '--pool', 'default_pool', '-sd', '/usr/local/lib/python3.5/dist-packages/airflow/example_dags/example_bash_operator.py']' returned non-zero exit status 1.
> {noformat}



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