[ 
https://issues.apache.org/jira/browse/FLINK-39691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082159#comment-18082159
 ] 

Arvind Kandpal edited comment on FLINK-39691 at 5/19/26 8:21 PM:
-----------------------------------------------------------------

Hi [~pavelzeger] ,

Totally understand! My intention wasn't to step on anyone's toes or bypass the 
guidelines. Since the ticket was unassigned, had been open for a few days, and 
seemed like a straightforward typo fix, I assumed it was open for anyone in the 
community to pick up. I meant no harm!

I've already closed my PR so you can take it forward. Thanks for finding the 
bug, and I'll make sure to explicitly ask for assignment before jumping in next 
time.

Cheers!


was (Author: JIRAUSER311141):
[~pavelzeger] , Thanks for Clarification. I have closed the PR. 

> 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
>            Priority: Minor
>              Labels: pull-request-available
>
> {*}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