fsanyoto commited on
Commit
4b32bf5
·
verified ·
1 Parent(s): 4d24cf6

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
Files changed (4) hide show
  1. RELEASES.json +1 -1
  2. VERSION +1 -1
  3. api/main.py +18 -6
  4. web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "42c956192",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "28dea583f9",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- 42c956192
 
1
+ 28dea583f9
api/main.py CHANGED
@@ -1356,17 +1356,29 @@ def _pull_amazon(why, vendor=True):
1356
  if not vendor:
1357
  print(f"[aios-api] amazon mirror restored ({why}); the daily sync is not due yet")
1358
  return True
 
1359
  from harness import mirror_store
1360
  from core import connector_sync as _amazon_status
1361
- _amazon_status.record_pass_start(rt, "amazon_sp")
1362
- try:
1363
- with _amazon_role.connector_writer(rt, "amazon"):
 
 
 
 
 
 
 
 
 
 
 
1364
  rep = mirror_store.tracked_sync("amazon", rt, lambda: _amazon.sync(tenant_key, rt=rt, scheduled=True,
1365
  slot_pass=bool(RESYNC_STATE.get("slotPass")),
1366
  log=lambda message: print(f"[aios-api] amazon sync ({why}): {message}")))
1367
- except Exception:
1368
- _status(rt, "amazon_sp", "failed", detail="The Amazon pull failed.")
1369
- raise
1370
  _holds = _amazon._MIRROR_STORE._publication_holds(rep, ()) or {}
1371
  _problems = _holds.get("unsettled", rep.get("problems") or [])
1372
  _status(rt, "amazon_sp", "failed" if _problems or rep.get("audit_problems") else
 
1356
  if not vendor:
1357
  print(f"[aios-api] amazon mirror restored ({why}); the daily sync is not due yet")
1358
  return True
1359
+ from contextlib import ExitStack
1360
  from harness import mirror_store
1361
  from core import connector_sync as _amazon_status
1362
+ with ExitStack() as _lease:
1363
+ try:
1364
+ _lease.enter_context(_amazon_role.connector_writer(rt, "amazon"))
1365
+ except Exception as exc:
1366
+ # A writer that took the lease after the first-load check owns Amazon: skip, record no pass.
1367
+ if isinstance(exc, RuntimeError) and "holds the amazon writer lease" in str(exc):
1368
+ print(f"[aios-api] amazon sync skipped ({why}): another job holds the Amazon writer lease",
1369
+ flush=True)
1370
+ return False
1371
+ _amazon_status.record_pass_start(rt, "amazon_sp")
1372
+ _status(rt, "amazon_sp", "failed", detail="The Amazon pull failed.")
1373
+ raise
1374
+ _amazon_status.record_pass_start(rt, "amazon_sp")
1375
+ try:
1376
  rep = mirror_store.tracked_sync("amazon", rt, lambda: _amazon.sync(tenant_key, rt=rt, scheduled=True,
1377
  slot_pass=bool(RESYNC_STATE.get("slotPass")),
1378
  log=lambda message: print(f"[aios-api] amazon sync ({why}): {message}")))
1379
+ except Exception:
1380
+ _status(rt, "amazon_sp", "failed", detail="The Amazon pull failed.")
1381
+ raise
1382
  _holds = _amazon._MIRROR_STORE._publication_holds(rep, ()) or {}
1383
  _problems = _holds.get("unsettled", rep.get("problems") or [])
1384
  _status(rt, "amazon_sp", "failed" if _problems or rep.get("audit_problems") else
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- f7c0a0536b6bde6a3f88ebebe93e9bd619df9ad402dafc3e8dc75d115cee4de7
 
1
+ b0081f6b8447ab0b643dd2a93d4019e06717448cd94dc78abb6a103639c41202