ferruzzi commented on code in PR #61079: URL: https://github.com/apache/airflow/pull/61079#discussion_r2734271590
########## shared/observability/src/airflow_shared/observability/metrics/stats.py: ########## @@ -29,6 +30,36 @@ log = logging.getLogger(__name__) +_VALID_STAT_NAME_CHARS_RE = re.compile(r"^[a-zA-Z0-9_.-]+$") +_INVALID_STAT_NAME_CHARS_RE = re.compile(r"[^a-zA-Z0-9_.-]") Review Comment: I know this is copypasta, but the StatsD and OTel metric names have different sets of allowed characters. The OTel list are in https://github.com/apache/airflow/blob/main/shared/observability/src/airflow_shared/observability/metrics/validators.py#L47 ########## airflow-core/tests/unit/dag_processing/test_manager.py: ########## @@ -734,11 +733,20 @@ def test_send_file_processing_statsd_timing( manager = DagFileProcessorManager(max_runs=1) manager.run() - last_runtime = manager._file_stats[os.fspath(path_to_parse)].last_duration + file_info = DagFileInfo( + bundle_name="testing", + rel_path=Path("temp_dag.py"), Review Comment: Should this maybe be using path_to_parse instead of a magic string that may drift over time? -- 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]
