The GitHub Actions job "Tests" on airflow.git/main has failed.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
6dea00cdb5ebacb67af747cf2ec062cdb8411f76 / Christos Bisias 
<[email protected]>
Add a pre-commit script for checking code & metrics registry are synced (#63757)

This patch adds a script that checks the metrics in all provided files.

The script reads the metrics from the registry YAML file and checks if the code 
metrics exist. If they do, then it validates that the metric type in the code 
is the same as in the YAML.

In the code, there are a lot of dynamic metric names with variables in them. 
Some of them belong to legacy metrics but not all of them.

For the dynamic metric names, if there is a partial match until the 1st 
variable appears, then we consider the metric registered in the YAML. That's 
the best scenario without having to account for all possible names after the 
variable expansion. 

It would be helpful to check if there are metrics in the YAML that don't appear 
in the code but it's not feasible when running the script against certain files 
and not every file in the project.

The next step after this PR, would be to remove the `DualStatsManager` entirely 
from the codebase. When that happens, the only change in this patch will be

```diff
- STATS_OBJECTS = {"Stats", "stats", "DualStatsManager"}
+ STATS_OBJECTS = {"Stats", "stats"}
```

For testing,
* I made a list for all the metrics that we should be catching with the script
* I asked Claude code to get me a list with all the metrics from the codebase
* I cross-referenced the lists
* Cross-referenced the lists with the metrics in the YAML file
* Cross-referenced all the discrepancies with the violations in the script 
output

Report URL: https://github.com/apache/airflow/actions/runs/23298232785

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to