AnandInguva commented on code in PR #27288:
URL: https://github.com/apache/beam/pull/27288#discussion_r1254979068
##########
sdks/python/apache_beam/testing/analyzers/github_issues_utils.py:
##########
@@ -174,13 +192,16 @@ 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[change_point_index - min_timestamp_index] += " <---- Anomaly"
+ runs_to_display = get_runs_data(
+ num_runs_from_change_point=max_results_to_display,
+ metric_values=metric_values,
+ timestamps=timestamps,
+ change_point_index=change_point_index)
+
+ # reverse the list to display the most recent runs first.
+ runs_to_display.reverse()
Review Comment:
1. Changed description to be a list. We can append to this list from now on.
2. Changed to reversing the runs instead of reversing the list.
--
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]