fix(ci): pin and diagnose private OIDC forwarder readiness
This commit is contained in:
1 parent
b78270e9d4
commit
4831165548
22 files changed
+231
-27
No files matched your search
@@ -62,14 +62,26 @@ def request(method: str, path: str, token: str | None = None, payload: dict | No
|
||||
|
||||
|
||||
def wait_until_ready() -> None:
|
||||
deadline = time.monotonic() + 70
|
||||
"""HTTP 200 /debug/ready is a status probe, not a JSON API response.
|
||||
|
||||
Keep all official management/user provisioning endpoints strictly JSON.
|
||||
The runner already proves the run-owned proxy/forwarder before this point.
|
||||
"""
|
||||
deadline = time.monotonic() + 35
|
||||
probe = Request(
|
||||
ORIGIN + "/debug/ready",
|
||||
headers={"Host": "localhost:8080", "Accept": "*/*"},
|
||||
method="GET",
|
||||
)
|
||||
while time.monotonic() < deadline:
|
||||
try:
|
||||
request("GET", "/debug/ready")
|
||||
return
|
||||
except RuntimeError:
|
||||
time.sleep(2)
|
||||
raise RuntimeError("Disposable localhost issuer port forwarding was not ready")
|
||||
with OPENER.open(probe, timeout=6) as reply:
|
||||
if reply.status == 200:
|
||||
return
|
||||
except (HTTPError, URLError, TimeoutError, OSError):
|
||||
pass # No response body, URL, session details, or credentials logged.
|
||||
time.sleep(2)
|
||||
raise RuntimeError("Private issuer readiness HTTP 200 not established")
|
||||
|
||||
|
||||
def required_string(data: dict, name: str) -> str:
|
||||
|
||||
Reference in new issue
Block a user