-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Include triggerer health status in Airflow /health endpoint #31529
Include triggerer health status in Airflow /health endpoint #31529
Conversation
2b49b61
to
392481a
Compare
392481a
to
8bfe5de
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.
Sweet! I could use that also in my Cluster Activity page to display the triggerer health 🎉
Maybe we can add a small test case ? (most of the utils are tested in test_utils
)
3ff9a49
to
6b7e659
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.
Minor suggestion but LGTM.
airflow/api/common/airflow_health.py
Outdated
UNHEALTHY = "unhealthy" | ||
|
||
|
||
def get_airflow_health(): |
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 we could add a return type annotation. (TypedDict
, or Dict
at least ?)
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.
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.
yes, CI is green now.
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.
I think you missed a nested level of dict, but I think any is acceptable here too.
PR apache#27755 introduced sending triggerer health status in the `/api/v1/health` endpoint and also updated relevant docs but we've the primary `/health` too which is missing this information. The PR addresses this missing status report for triggerer health in the `/health` endpoint. It also attempts to deduplicate the code between those endpoints so that in future we need to make necessary changes in only one place and at the same time ensure that change made in one endpoint is not missed for the other endpoint serving the same purpose and thus ensuring consistency in the responses. fixes: apache#31522
ba47a63
to
22994d7
Compare
PR #27755 introduced sending triggerer health status in the `/api/v1/health` endpoint and also updated relevant docs but we've the primary `/health` too which is missing this information. The PR addresses this missing status report for triggerer health in the `/health` endpoint. It also attempts to deduplicate the code between those endpoints so that in future we need to make necessary changes in only one place and at the same time ensure that change made in one endpoint is not missed for the other endpoint serving the same purpose and thus ensuring consistency in the responses. fixes: #31522 (cherry picked from commit f048aba)
PR #27755 introduced sending triggerer health status in the `/api/v1/health` endpoint and also updated relevant docs but we've the primary `/health` too which is missing this information. The PR addresses this missing status report for triggerer health in the `/health` endpoint. It also attempts to deduplicate the code between those endpoints so that in future we need to make necessary changes in only one place and at the same time ensure that change made in one endpoint is not missed for the other endpoint serving the same purpose and thus ensuring consistency in the responses. fixes: #31522 (cherry picked from commit f048aba)
PR #27755 introduced sending triggerer health status in the
/api/v1/health
endpoint and also updated relevant docs but we have the primary
/health
endpoint too which is missing this information. The PR addresses this missing
status report for triggerer health in the
/health
endpoint. It also attempts todeduplicate the code between those endpoints so that in future when we need
to make necessary changes in only one place and at the same time ensure that
change made in one endpoint is not missed for the other endpoint serving the
same purpose and thus ensuring consistency in the responses.
fixes: #31522
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.