AnandInguva commented on code in PR #27288:
URL: https://github.com/apache/beam/pull/27288#discussion_r1245680530


##########
sdks/python/apache_beam/testing/analyzers/github_issues_utils.py:
##########
@@ -174,13 +174,19 @@ def get_issue_description(
       2 * '\n') if test_description else ''
 
   description += '```' + '\n'
-  runs_to_display = [
-      _METRIC_INFO_TEMPLATE.format(
-          timestamps[i].ctime(), format(metric_values[i], '.2f'))
-      for i in reversed(range(min_timestamp_index, max_timestamp_index + 1))
-  ]
+  runs_to_display = []
 
-  runs_to_display[change_point_index - min_timestamp_index] += " <---- Anomaly"
+  for i in range(min_timestamp_index, max_timestamp_index + 1):
+    template = _METRIC_INFO_TEMPLATE.format(
+        timestamps[i].ctime(), format(metric_values[i], '.2f'))
+    if i == change_point_index:
+      template += ' <---- Anomaly'
+    runs_to_display.append(template)
+
+  # reverse the list to display the most recent runs first.
+  runs_to_display.reverse()
+
+  # runs_to_display[change_point_index - min_timestamp_index] += " <---- 
Anomaly"

Review Comment:
   ```suggestion
   ```



-- 
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]

Reply via email to