You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/10/05 10:46:01 UTC
[airflow] 14/44: Add more exemptions to lengthy metric list (#34531)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit ec7007e7d78477474b29f776c2beef025d1cad68
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>
(cherry picked from commit fa6ca5d5316a9bd759a702e1688a69b19e4e63bc)
---
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 1f04edd1bf..ba19e3c9a2 100644
--- a/tests/core/test_otel_logger.py
+++ b/tests/core/test_otel_logger.py
@@ -66,9 +66,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."
)