mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
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>
This commit is contained in:
parent
61ab9ae2af
commit
cf86e97ace
1 changed files with 15 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue