diff options
author | Helen Koike <helen.koike@collabora.com> | 2023-10-20 19:14:22 -0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-01-17 13:10:07 +0000 |
commit | cf86e97ace3f6f6db95f79350a8ca107276e17db (patch) | |
tree | 4c8d673ebffa2b29194dc8e6069abed15b076b99 /bin | |
parent | 61ab9ae2af193ab534066687266a58878232ba81 (diff) |
ci/ci_gantt_chart: add timeout vertical line
Add pipeline total duration and add a timeout vertical line to indicate
the 1h Timeout mark.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ci/ci_gantt_chart.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/ci/ci_gantt_chart.py b/bin/ci/ci_gantt_chart.py index d8d133877c7..0cd40dde85d 100755 --- a/bin/ci/ci_gantt_chart.py +++ b/bin/ci/ci_gantt_chart.py @@ -91,6 +91,21 @@ def generate_gantt_chart(pipeline): # Calculate the height dynamically fig.update_layout(height=len(tasks) * 10, yaxis_tickfont_size=14) + # Add a deadline line to the chart + created_at = datetime.fromisoformat(pipeline.created_at.replace("Z", "+00:00")) + timeout_at = created_at + timedelta(hours=1) + fig.add_vrect( + x0=timeout_at, + x1=timeout_at, + annotation_text="1h Timeout", + fillcolor="gray", + line_width=2, + line_color="gray", + line_dash="dash", + annotation_position="top left", + annotation_textangle=90, + ) + return fig |