You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/09/21 23:31:44 UTC
[airflow] branch main updated: Add more exemptions to lengthy metric list (#34531)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new fa6ca5d531 Add more exemptions to lengthy metric list (#34531)
fa6ca5d531 is described below
commit fa6ca5d5316a9bd759a702e1688a69b19e4e63bc
Author: Saurabh Kumar <55...@users.noreply.github.com>
AuthorDate: Thu Sep 21 19:31:37 2023 -0400
Add more exemptions to lengthy metric list (#34531)
Co-authored-by: Saurabh Kumar <ma...@sa1.me>
---
airflow/metrics/validators.py | 3 +++
tests/core/test_otel_logger.py | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/airflow/metrics/validators.py b/airflow/metrics/validators.py
index 7f0bbac218..8bd6dd4476 100644
--- a/airflow/metrics/validators.py
+++ b/airflow/metrics/validators.py
@@ -70,9 +70,12 @@ BACK_COMPAT_METRIC_NAME_PATTERNS: set[str] = {
r"^pool\.open_slots\.(?P<pool_name>.*)$",
r"^pool\.queued_slots\.(?P<pool_name>.*)$",
r"^pool\.running_slots\.(?P<pool_name>.*)$",
+ r"^pool\.deferred_slots\.(?P<pool_name>.*)$",
r"^pool\.starving_tasks\.(?P<pool_name>.*)$",
r"^dagrun\.dependency-check\.(?P<dag_id>.*)$",
r"^dag\.(?P<dag_id>.*)\.(?P<task_id>.*)\.duration$",
+ r"^dag\.(?P<dag_id>.*)\.(?P<task_id>.*)\.queued_duration$",
+ r"^dag\.(?P<dag_id>.*)\.(?P<task_id>.*)\.scheduled_duration$",
r"^dag_processing\.last_duration\.(?P<dag_file>.*)$",
r"^dagrun\.duration\.success\.(?P<dag_id>.*)$",
r"^dagrun\.duration\.failed\.(?P<dag_id>.*)$",
diff --git a/tests/core/test_otel_logger.py b/tests/core/test_otel_logger.py
index 130d84265c..6cba116f65 100644
--- a/tests/core/test_otel_logger.py
+++ b/tests/core/test_otel_logger.py
@@ -65,9 +65,9 @@ class TestOtelMetrics:
assert not _is_up_down_counter("this_is_not_a_udc")
def test_exemption_list_has_not_grown(self):
- assert len(BACK_COMPAT_METRIC_NAMES) <= 23, (
+ assert len(BACK_COMPAT_METRIC_NAMES) <= 26, (
"This test exists solely to ensure that nobody is adding names to the exemption list. "
- "There are 23 names which are potentially too long for OTel and that number should "
+ "There are 26 names which are potentially too long for OTel and that number should "
"only ever go down as these names are deprecated. If this test is failing, please "
"adjust your new stat's name; do not add as exemption without a very good reason."
)