You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/21 16:00:38 UTC
[GitHub] [airflow] notatallshaw-work opened a new issue, #26566: Have SLA docs reflect reality
notatallshaw-work opened a new issue, #26566:
URL: https://github.com/apache/airflow/issues/26566
### What do you see as an issue?
The [SLA documentation](https://airflow.apache.org/docs/apache-airflow/stable/concepts/tasks.html#slas) currently states the following:
> An SLA, or a Service Level Agreement, is an expectation for the maximum time a Task should take. If a task takes longer than this to run
However this is not how SLAs currently work in Airflow, the SLA time is calculated from the start of the DAG not from the start of the task.
For example if you have a DAG like this the SLA will always trigger after the DAG has started for 5 minutes even though the task never takes 5 minutes to run:
```python
import datetime
from airflow import DAG
from airflow.sensors.time_sensor import TimeSensor
from airflow.operators.python import PythonOperator
with DAG(dag_id="my_dag", schedule_interval="0 0 * * *") as dag:
wait_time_mins = TimeSensor(target_time=datetime.time(minute=10))
run_fast = PythonOperator(
python_callable=lambda *a, **kwargs: True,
sla=datetime.timedelta(minutes=5),
)
run_fast.set_upstream(wait_time_mins)
```
### Solving the problem
Update the docs to explain how SLAs work in reality.
### Anything else
_No response_
### Are you willing to submit PR?
- [X] 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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26566: Have SLA docs reflect reality
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26566:
URL: https://github.com/apache/airflow/issues/26566#issuecomment-1253952872
Feel free to update the docs.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk closed issue #26566: Have SLA docs reflect reality
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #26566: Have SLA docs reflect reality
URL: https://github.com/apache/airflow/issues/26566
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] notatallshaw-work commented on issue #26566: Have SLA docs reflect reality
Posted by GitBox <gi...@apache.org>.
notatallshaw-work commented on issue #26566:
URL: https://github.com/apache/airflow/issues/26566#issuecomment-1253997165
> Feel free to update the docs.
Will do, made issue mostly to see if someone would disagree with me. I'll make a PR to update the docs soon.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26566: Have SLA docs reflect reality
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26566:
URL: https://github.com/apache/airflow/issues/26566#issuecomment-1254889475
assigned you :)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org