fix: renew dev session window from trusted time
Foundation / checks (client) (push) Successful in 25s
Foundation / checks (checks) (push) Successful in 33s
Foundation / checks (ecs) (push) Successful in 15s
Foundation / checks (network) (push) Successful in 11s
Foundation / checks (postgres) (push) Successful in 1m39s
Foundation / checks (deploy) (push) Successful in 3m29s
Foundation / checks (tsan) (push) Successful in 5m37s
Foundation / image (push) Successful in 11s
Foundation / postgres-tools (push) Successful in 17s
Foundation / server-image (push) Successful in 19s
Foundation / checks (client) (push) Successful in 25s
Foundation / checks (checks) (push) Successful in 33s
Foundation / checks (ecs) (push) Successful in 15s
Foundation / checks (network) (push) Successful in 11s
Foundation / checks (postgres) (push) Successful in 1m39s
Foundation / checks (deploy) (push) Successful in 3m29s
Foundation / checks (tsan) (push) Successful in 5m37s
Foundation / image (push) Successful in 11s
Foundation / postgres-tools (push) Successful in 17s
Foundation / server-image (push) Successful in 19s
This commit is contained in:
@@ -90,12 +90,27 @@ jobs:
|
|||||||
print(f'Promoting dev from {old_build} to {build}; retained previous build')
|
print(f'Promoting dev from {old_build} to {build}; retained previous build')
|
||||||
PY
|
PY
|
||||||
|
|
||||||
- name: Renew dev M10 session window
|
- name: Renew dev M10 session window from trusted cluster time
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
id="dev-$(date -u +%Y%m%dT%H%M%S)-$RANDOM"
|
window="$(python3 - <<'PY'
|
||||||
expiry="$(date -u -d '+240 minutes' +%s)"
|
import email.utils
|
||||||
window="$id:$expiry"
|
import urllib.request
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
request = urllib.request.Request(
|
||||||
|
'https://git.aeternalisgames.com/api/v1/version',
|
||||||
|
method='HEAD',
|
||||||
|
)
|
||||||
|
with urllib.request.urlopen(request, timeout=10) as response:
|
||||||
|
date_header = response.headers.get('Date')
|
||||||
|
if not date_header:
|
||||||
|
raise SystemExit('trusted Gitea response did not include a Date header')
|
||||||
|
now = int(email.utils.parsedate_to_datetime(date_header).timestamp())
|
||||||
|
stamp = datetime.fromtimestamp(now, timezone.utc).strftime('%Y%m%dT%H%M%S')
|
||||||
|
print(f'dev-{stamp}:{now + 240 * 60}')
|
||||||
|
PY
|
||||||
|
)"
|
||||||
WINDOW="$window" python3 - <<'PY'
|
WINDOW="$window" python3 - <<'PY'
|
||||||
import os, re
|
import os, re
|
||||||
path = 'deploy/kubernetes/region/dev-session-route/listener.yaml'
|
path = 'deploy/kubernetes/region/dev-session-route/listener.yaml'
|
||||||
@@ -108,7 +123,7 @@ jobs:
|
|||||||
if count != 1:
|
if count != 1:
|
||||||
raise SystemExit(f'{path}: expected one REGION_SESSION_WINDOW value, found {count}')
|
raise SystemExit(f'{path}: expected one REGION_SESSION_WINDOW value, found {count}')
|
||||||
open(path, 'w', encoding='utf-8').write(text)
|
open(path, 'w', encoding='utf-8').write(text)
|
||||||
print('Renewed dev M10 session window')
|
print(f'Renewed dev M10 session window from trusted time: {os.environ["WINDOW"]}')
|
||||||
PY
|
PY
|
||||||
|
|
||||||
- name: Validate and commit promotion
|
- name: Validate and commit promotion
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- {name: REGION_SESSION, value: "dev"}
|
- {name: REGION_SESSION, value: "dev"}
|
||||||
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
||||||
- {name: REGION_SESSION_WINDOW, value: "dev-20261009T012919-51fc:1791523159"}
|
- {name: REGION_SESSION_WINDOW, value: "dev-20261009T100326:1791554606"}
|
||||||
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
||||||
ports:
|
ports:
|
||||||
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
||||||
|
|||||||
Reference in New Issue
Block a user