You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
roachprod: fix NewPromClient creating IAP token source when disabled
Previously, after the IAP authentication refactor in commit ba62711,
NewPromClient() would always attempt to create an IAP token source, even
when Prometheus integration was disabled via ROACHPROD_PROM_HOST_URL="".
This caused roachprod start to fail when running outside of Google Cloud
environments with:
failed to create IAP token source: failed to get default credentials:
glcoud not on path
The issue was that the condition in NewPromClient() only checked if
c.httpClient == nil but didn't verify whether the client was disabled.
When ROACHPROD_PROM_HOST_URL="" is set, promRegistrationUrl becomes ""
which sets disabled: true, but the IAP token source creation was still
being attempted.
This change modifies the condition to also check !c.disabled, ensuring
that when Prometheus integration is disabled, no IAP authentication
is attempted.
Epic: None
Release Notes: None
0 commit comments