-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
[AIRFLOW-4343] Show warning in UI if scheduler is not running #5127
Conversation
cb0bf50
to
a00fe0d
Compare
@XD-DENG PTAL too - I've subtly changed the /health endpoint here to use functions from airflow.jobs. |
a00fe0d
to
0af1963
Compare
Awesome feature 👍Will have a deeper dive later. |
6b31eae
to
37f0f2e
Compare
e4f7d50
to
17dbba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @ashb I really like this feature 👍
only some comments..
17dbba0
to
e3115b2
Compare
@ashb Nice feature. A suggestion here: adding a link (with the warning) to the scheduler logs would help debug quicker. It should show only a portion of the logs. |
@sdikby That would be nice but is non-trival to do so I'm not going to do it as part of this PR. |
a53202e
to
58f1b1f
Compare
58f1b1f
to
47c1bc0
Compare
f8f8682
to
a5f4f22
Compare
airflow/jobs.py
Outdated
|
||
:param grace_multiplier: multiplier of heartrate to require heart beat | ||
within | ||
:type grace_multiplier: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this from here and add type hint in L130
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type hint's aren't picked up by docs yet are they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I don't know tbh :-D
Just for our future reference, we can use this:
https://github.com/agronholm/sphinx-autodoc-typehints
I think something odd/unexpected is up with the Kube tests as a result of this PR. They consistently fail but don't on master. |
airflow/jobs.py
Outdated
@@ -94,25 +94,54 @@ class BaseJob(Base, LoggingMixin): | |||
Index('idx_job_state_heartbeat', state, latest_heartbeat), | |||
) | |||
|
|||
heartrate = conf.getfloat('scheduler', 'JOB_HEARTBEAT_SEC'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEAR GOD. That took like 4 hours to get enough of a working set up to get the log for!
a5f4f22
to
6add858
Compare
Codecov Report
@@ Coverage Diff @@
## master #5127 +/- ##
==========================================
+ Coverage 78.93% 78.93% +<.01%
==========================================
Files 480 480
Lines 30129 30146 +17
==========================================
+ Hits 23782 23797 +15
- Misses 6347 6349 +2
Continue to review full report at Codecov.
|
17ff921
to
a2b1370
Compare
Now that the webserver is more stateless, if the scheduler is not running the list of dags won't populate, making it harder for new starters to work out what is going on. New dep is BSD-2 which is Cat-A under ASF
a2b1370
to
657a2ee
Compare
…#5127) Now that the webserver is more stateless, if the scheduler is not running the list of dags won't populate, making it harder for new starters to work out what is going on. New dep is BSD-2 which is Cat-A under ASF
…#5127) Now that the webserver is more stateless, if the scheduler is not running the list of dags won't populate, making it harder for new starters to work out what is going on. New dep is BSD-2 which is Cat-A under ASF
Somehow in the cherry pick these tests got missed.
First commit is from #5125, look at the second commit only for now.
Make sure you have checked all steps below.
Jira
Description
Now that the webserver is more stateless, if the scheduler is not
running the list of dags won't populate, making it harder for new
starters to work out what is going on.
When scheduler has never run (I cleared Jobs table):

**When scheduler not running (either crashed, or has stopped successfully)

(the time has a tooltip to display the full ISO8601 heartbeat)
Login screen/anything not subclassed from AirflowBaseView doesn't display the message.
On Login (not changed, doesn't show warning):
Tests
Commits
Documentation
Code Quality
flake8
/cc @Fokko as discussed.