Skip to content

Stop reporting components as degraded after an instance restart - #73222

Merged
vincbeck merged 2 commits into
apache:mainfrom
aws-mwaa:vincbeck/health_detailed_status_coverage
Sep 18, 2026
Merged

vincbeck merged 2 commits into
apache:mainfrom
aws-mwaa:vincbeck/health_detailed_status_coverage

Conversation

@vincbeck

Copy link
Copy Markdown
Contributor

The health endpoint's detailed_status compared live job rows against all unfinished job rows, but a job row is only marked finished by a cooperative shutdown. An instance lost to SIGKILL, an out-of-memory kill, or a node eviction leaves its row unfinished forever, so restarting any scheduler, triggerer, or Dag processor made the component look permanently degraded even though the deployment was fully healthy.

The question detailed_status should answer is whether every part of a component's work has a live instance covering it, which needs the expected set of work to be declared rather than inferred from whatever rows happen to be in the table. Dag bundle configuration already declares it for the components that partition their work, and schedulers do not partition theirs at all.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@vincbeck

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun I would love to get your opinion on this one :)

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice one.

Overall looking good, just a few nits / questions.

Comment thread airflow-core/src/airflow/api_fastapi/core_api/datamodels/monitor.py Outdated
Comment thread airflow-core/src/airflow/api/common/airflow_health.py
Comment thread airflow-core/src/airflow/api/common/airflow_health.py Outdated
Comment thread airflow-core/src/airflow/dag_processing/bundles/manager.py

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meant to approve

@vincbeck
vincbeck force-pushed the vincbeck/health_detailed_status_coverage branch from 7996e8c to 623305d Compare September 17, 2026 20:18
The health endpoint's ``detailed_status`` compared live job rows against all
unfinished job rows, but a job row is only marked finished by a cooperative
shutdown. An instance lost to SIGKILL, an out-of-memory kill, or a node
eviction leaves its row unfinished forever, so restarting any scheduler,
triggerer, or Dag processor made the component look permanently ``degraded``
even though the deployment was fully healthy. Those same abandoned rows were
also listed in ``instances``, advertising hosts that no longer exist.

The question ``detailed_status`` should answer is whether every part of a
component's work has a live instance covering it, which needs the expected set
of work to be declared rather than inferred from whatever rows happen to be in
the table. Dag bundle configuration already declares it for the components that
partition their work, and schedulers do not partition theirs at all.
@vincbeck
vincbeck force-pushed the vincbeck/health_detailed_status_coverage branch from 623305d to e22cfc0 Compare September 18, 2026 13:52
@vincbeck
vincbeck merged commit 92c919d into apache:main Sep 18, 2026
302 of 303 checks passed
@vincbeck
vincbeck deleted the vincbeck/health_detailed_status_coverage branch September 18, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants