kaxil commented on code in PR #76737:
URL: https://github.com/apache/airflow/pull/76737#discussion_r4620623627
##########
shared/observability/tests/observability/metrics/test_stats.py:
##########
@@ -732,16 +732,17 @@ def test_decr_emits_both_when_legacy_name_exists(self,
mock_backend):
tags={"operator_name": "EmptyOperator", "dag_id": "test_dag"},
)
- def test_gauge_emits_both_when_legacy_name_exists(self, mock_backend):
+ @pytest.mark.parametrize("stat", ["ti.scheduled", "ti.awaiting_input"])
Review Comment:
This pins `awaiting_input`, but the next state added to `metric_states` in
`_emit_ti_metrics` can hit the same gap, since the prek hook matches
`ti.{state}` against any `ti.*` entry. Could a test check that every state the
scheduler reports has a registry entry with a `legacy_name`? That needs
`metric_states` hoisted to a module-level constant, so it's fine as a follow-up
if you'd rather keep this PR small.
##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -2826,8 +2826,8 @@ scheduler:
default: "5.0"
ti_metrics_interval:
description: |
- How often (in seconds) should task instance (scheduled, queued,
running and deferred) stats
- be sent to StatsD (if statsd_on is enabled)
+ How often (in seconds) should task instance (scheduled, queued,
running, deferred and
Review Comment:
`airflow-core/docs/administration-and-deployment/scheduler.rst` repeats this
description by hand (around line 266) and still says "scheduled, queued,
running and deferred". Can you update it there too so the two pages agree?
--
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]