fix grafana dashboard link for pooler endoints (#11099)

## Problem

Our benchmarking workflows contain links to grafana dashboards to
troubleshoot problems.
This works fine for non-pooled endpoints.
For pooled endpoints we need to remove the `-pooler` suffix from the
endpoint's hostname to get a valid endpoint ID.

Example link that doesn't work in this run


https://github.com/neondatabase/neon/actions/runs/13678933253/job/38246028316#step:8:311

## Summary of changes

Check if connection string is a -pooler connection string and if so
remove this suffix from the endpoint ID.

---------

Co-authored-by: Alexander Bayandin <alexander@neon.tech>
This commit is contained in:
Peter Bendel
2025-03-05 21:01:17 +01:00
committed by GitHub
parent d599d2df80
commit 604eb5e8d4

View File

@@ -337,6 +337,8 @@ def allure_add_grafana_link(host: str, timeline_id: TimelineId, start_ms: int, e
"""
# We expect host to be in format like ep-holy-mouse-w2u462gi.us-east-2.aws.neon.build
endpoint_id, region_id, _ = host.split(".", 2)
# Remove "-pooler" suffix if present
endpoint_id = endpoint_id.removesuffix("-pooler")
params = {
"orgId": 1,