airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-5149) Config flag to skip SLA checks
Date Sat, 28 Dec 2019 19:51:00 GMT

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

ASF subversion and git services commented on AIRFLOW-5149:
----------------------------------------------------------

Commit 7d97d16c47ba181839fd583b8653d2872dc4290b in airflow's branch refs/heads/master from
tooptoop4
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=7d97d16 ]

[AIRFLOW-5149] - skip SLA checks config (#6923)

* [AIRFLOW-5149] - skip SLA checks config


> Config flag to skip SLA checks
> ------------------------------
>
>                 Key: AIRFLOW-5149
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5149
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: DAG, DagRun, scheduler
>    Affects Versions: 1.10.4
>            Reporter: t oo
>            Assignee: t oo
>            Priority: Minor
>             Fix For: 2.0.0, 1.10.8
>
>
> Some airflow users have no use of managing SLAs within airflow. I believe the scheduling
process should be as fast as possible and not do unnecessary logging, the current IF statement
is slower than a boolean flag and produces a redundant log.
> h1. *EXISTING BEHAVIOR*
> |if not any([isinstance(ti.sla, timedelta) for ti in dag.tasks]):|
> | |self.log.info("Skipping SLA check for %s because no tasks in DAG have SLAs", dag)|
> | |return|
>  
> h1. *FIX*
> [https://github.com/apache/airflow/blob/master/airflow/jobs/scheduler_job.py]
> within
> |def _process_dags(self, dagbag, dags, tis_out):|
>  
> line 1221
> *BEFORE*
> self._process_task_instances(dag, tis_out)
>  self.manage_slas(dag)
>  
> *AFTER*
> 1.
> self._process_task_instances(dag, tis_out)
> if conf.getboolean('scheduler', 'CHECK_SLA'):
>     self.manage_slas(dag)
>  
> 2. config then has a new variable check_sla with default true so existing users unaffected
but other users can set to false.
>  
>  
>  



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

Mime
View raw message