Pavel Zeger created FLINK-39691:
-----------------------------------

             Summary: Fix "mim" typo in AggregatedMetric.toString() in operator 
and autoscaler-standalone modules
                 Key: FLINK-39691
                 URL: https://issues.apache.org/jira/browse/FLINK-39691
             Project: Flink
          Issue Type: Bug
          Components: Kubernetes Operator
            Reporter: Pavel Zeger


## Where
 
Two copies of `AggregatedMetric` still contain the typo:
 
- 
`flink-kubernetes-operator/src/main/java/org/apache/flink/runtime/rest/messages/job/metrics/AggregatedMetric.java`
 line 130
- 
`flink-autoscaler-standalone/src/main/java/org/apache/flink/runtime/rest/messages/job/metrics/AggregatedMetric.java`
 line 130
 
Both contain:
```java
+ ", mim='"
+ min
```
 
## Why this is a bug
 
The third copy of the same file 
(`flink-autoscaler/src/main/java/org/apache/flink/runtime/rest/messages/job/metrics/AggregatedMetric.java`)
 was already fixed by hotfix commit `e8f1e23` ("Fix typo in AggregatedMetric
string representation", Feb 2026):
 
```diff
- + ", mim='"
+ + ", min='"
+ min
```
but the maintainer only fixed one of the three places. The other two still 
print `mim=` in the value of `toString()`, which:
 
- Makes log output / debug printing look broken to anyone reading it.
- Causes inconsistency between the three modules — a `toString()` of the
same object differs depending on which copy of the class is on the classpath.
- Wastes time for any future engineer who greps for "mim" trying to
understand whether it's intentional.
 
## Reproduction
```bash
grep -rn '"mim=' flink-kubernetes-operator/src/main/java
grep -rn '"mim=' flink-autoscaler-standalone/src/main/java
```
Both return the line above.
 
## Proposed fix
Apply the same one-character fix to both files:
 
```diff
- + ", mim='"
+ + ", min='"
+ min
```
Plus add a unit test that asserts `toString()` produces the correct field name. 
The test covers all three copies and prevents regression.
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to