Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge existing SLA implementation #42285

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ferruzzi
Copy link
Contributor

@ferruzzi ferruzzi commented Sep 17, 2024

As discussed in the Airflow 3.0 dev calls, the first step for the new SLA system is stripping the existing implementation out.

I did this PR in multiple commits to try to make it more transparent. In this PR:

  1. Remove everything related to SLA in the code.
  2. Add back the absolute minimum so that existing DAGs won't throw an exception. @bbovenzi said he can add a UI banner so any DAG which implements an SLA will get a notification that SLA is not working in 3.0, but we don't want all existing DAGs to start throwing exceptions left and right either.
  3. Added a log message to models/dag which triggers if the DAG is init'ed with an "sla_miss_callback"
  4. Went through the docs directory and stripped out all references to the SLA feature.

@ferruzzi ferruzzi force-pushed the ferruzzi/sla2/0-purge-old-code branch from 5560ba3 to f62927e Compare September 18, 2024 16:15
Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are is an SLA related configuration that I don't see removed in this PR?
https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#check-slas

docs/apache-airflow/core-concepts/tasks.rst Show resolved Hide resolved
@jscheffl jscheffl added the airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes label Sep 18, 2024
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, added the breaking label, now CI test fails with exactly the comment I wanted to make - please add a newsfragment for the breaking change
Otherwise - looks good for me.

I am a bit surprised that the carve-out of SLA just gains 1k LoC

@ferruzzi
Copy link
Contributor Author

ferruzzi commented Sep 18, 2024

I am a bit surprised that the carve-out of SLA just gains 1k LoC

Yeah. It's an odd one. I really expected this to be a much larger surgery with tendrils all over the place. It wasn't as bad as I had feared; 28 files is pretty broad but a solid chunk of them are docs pages which just linked back tot he SLA concept page.

please add a newsfragment for the breaking change

I should have known to do that, sorry. I'll add it.

There are is an SLA related configuration that I don't see removed in this PR?

Yeah, I may have missed that one. I'll make another pass and see what I can find related to "check_slas" and prune it.

Maybe a sentence or two describing this feature as deprecated in 3.0? And that there are plans to add it back in 3.1?

I'll come up with something.

@ferruzzi ferruzzi force-pushed the ferruzzi/sla2/0-purge-old-code branch from 224fe96 to 25e1a7f Compare September 19, 2024 21:36
@@ -975,7 +965,6 @@ def __init__(
if self.pool_slots < 1:
dag_str = f" in dag {dag.dag_id}" if dag else ""
raise ValueError(f"pool slots for {self.task_id}{dag_str} cannot be less than 1")
self.sla = sla
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it, but then I think we'll be getting a lot of duplicate warnings. I think in one place should be good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes area:providers area:Scheduler including HA (high availability) scheduler area:serialization kind:documentation provider:amazon-aws AWS/Amazon - related issues provider:pagerduty provider:slack provider:smtp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants