JoelEmmanuelCloud commented on code in PR #76410: URL: https://github.com/apache/airflow/pull/76410#discussion_r4639204674
########## airflow-core/src/airflow/migrations/versions/0158_3_5_0_add_executor_health_columns_to_job.py: ########## @@ -0,0 +1,55 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Add health_check_result and owner_job_id to Job. + +Revision ID: feb8b1e719ee +Revises: c64b10719069 +Create Date: 2026-11-05 09:00:00.000000 + +""" + +from __future__ import annotations + +import sqlalchemy as sa +from alembic import op + +from airflow.migrations.utils import disable_sqlite_fkeys + +revision = "feb8b1e719ee" Review Comment: fixed, 3.5.0 now points at feb8b1e719ee. updated migrations-ref.rst too. ########## airflow-core/src/airflow/api_fastapi/core_api/datamodels/monitor.py: ########## @@ -75,10 +86,25 @@ class DagProcessorInfoResponse(BaseInfoResponse): instances: list[DagProcessorInstanceInfoResponse] | None = None +class ExecutorInfoResponse(BaseInfoResponse): + """ + Executor info serializer for responses. + + Only present when at least one configured executor implements a health check; an executor that + doesn't isn't a gap in coverage, so a deployment where nothing reports simply has no ``executor`` + key at all, rather than one that always reads unhealthy. + """ + + latest_executor_heartbeat: str | None + detailed_status: DetailedHealthStatus | None + instances: list[ExecutorInstanceInfoResponse] | None = None + + class HealthInfoResponse(BaseModel): """Health serializer for responses.""" metadatabase: BaseInfoResponse scheduler: SchedulerInfoResponse triggerer: TriggererInfoResponse dag_processor: DagProcessorInfoResponse | None = None + executor: ExecutorInfoResponse | None = None Review Comment: regenerated both. ExecutorInfoResponse is in the spec and the UI client now. ########## airflow-core/tests/unit/api/common/test_airflow_health.py: ########## @@ -662,4 +668,299 @@ def test_get_airflow_health_mixed_triggerers_include_team_names(self, testing_te "team_names": [testing_team.name], }, ] - assert health_status["triggerer"]["latest_triggerer_heartbeat"] == alive_heartbeat.isoformat() Review Comment: that was an accident, i dropped it when i added the new test classes right after it. put it back. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
