1996fanrui commented on code in PR #660:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/660#discussion_r1310383497
##########
flink-kubernetes-operator-autoscaler/src/test/java/org/apache/flink/kubernetes/operator/autoscaler/AutoScalerFlinkMetricsTest.java:
##########
@@ -66,8 +67,10 @@ public void testMetricsRegistration() {
initRecommendedParallelism(evaluatedMetrics);
lastEvaluatedMetrics.put(resourceID, evaluatedMetrics);
- metrics.registerScalingMetrics(() ->
lastEvaluatedMetrics.get(resourceID));
- metrics.registerScalingMetrics(() ->
lastEvaluatedMetrics.get(resourceID));
+ metrics.registerScalingMetrics(
+ () -> List.of(jobVertexID), () ->
lastEvaluatedMetrics.get(resourceID));
+ metrics.registerScalingMetrics(
+ () -> List.of(jobVertexID), () ->
lastEvaluatedMetrics.get(resourceID));
Review Comment:
Sorry, Max. I didn't express clear.
This PR you fix a bug that some metrics aren't ready when
`registerScalingMetrics` is called, so these metrics cannot be registerd even
if they are ready in the future.
Could we adding a test for this case? This test should fail without your PR,
and it should success with your PR.
Please let me know if it's not clear, thanks~
--
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]