fsanyoto commited on
Commit
962fd25
·
verified ·
1 Parent(s): 043da5c

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "0586be259",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "f3bb007b4",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- 0586be259
 
1
+ f3bb007b4
api/main.py CHANGED
@@ -941,7 +941,12 @@ def _restore_amazon_mirror_once(why, tenant_key):
941
  from harness import amazon_store as _amazon
942
  from harness import runtime as _runtime
943
  import routes_odoo_tables as _rot
944
- rt = _runtime.get_runtime(tenant_key)
 
 
 
 
 
945
  from harness import datastore as _ds
946
  if (rt.key != tenant_key or
947
  rt.datastore_path.resolve() != _ds.path_for(tenant_key).resolve()):
 
941
  from harness import amazon_store as _amazon
942
  from harness import runtime as _runtime
943
  import routes_odoo_tables as _rot
944
+ try:
945
+ rt = _runtime.get_runtime(tenant_key)
946
+ except KeyError:
947
+ # known_tenants lists suspended records too, and those serve nothing to restore.
948
+ RESYNC_STATE.setdefault("amazonRestoreErrors", {}).pop(tenant_key, None)
949
+ return True
950
  from harness import datastore as _ds
951
  if (rt.key != tenant_key or
952
  rt.datastore_path.resolve() != _ds.path_for(tenant_key).resolve()):
api/routes_odoo_tables.py CHANGED
@@ -426,8 +426,10 @@ def _dataset_scope_status(session):
426
  if allowed:
427
  cur = None
428
  try:
429
- cur, refused = _mirror_cur(session)
430
- result.update(rel.dataset_scope_metadata(None if refused else cur, keys=allowed))
 
 
431
  except Exception:
432
  result.update(rel.dataset_scope_metadata(None, keys=allowed))
433
  finally:
 
426
  if allowed:
427
  cur = None
428
  try:
429
+ # The mirror cursor is the thread's shared one, so read and close only a child of it.
430
+ shared, refused = _mirror_cur(session)
431
+ cur = None if refused or shared is None else shared.cursor()
432
+ result.update(rel.dataset_scope_metadata(cur, keys=allowed))
433
  except Exception:
434
  result.update(rel.dataset_scope_metadata(None, keys=allowed))
435
  finally:
api/routes_platform_admin.py CHANGED
@@ -371,7 +371,8 @@ def _database_rows(slug, rt):
371
  return [], f"databases unreadable ({type(e).__name__})"
372
  rows = []
373
  for key, t in sorted(tables.items(), key=lambda kv: (kv[1].get("label") or "").lower()):
374
- if not isinstance(t, dict):
 
375
  continue
376
  rows.append({
377
  "tenant": slug,
 
371
  return [], f"databases unreadable ({type(e).__name__})"
372
  rows = []
373
  for key, t in sorted(tables.items(), key=lambda kv: (kv[1].get("label") or "").lower()):
374
+ # Every tenant carries the native activity log; no tenant created it.
375
+ if not isinstance(t, dict) or key == "ut_activity":
376
  continue
377
  rows.append({
378
  "tenant": slug,
api/routes_sheet.py CHANGED
@@ -112,7 +112,11 @@ def _refuse_unapplied_audience(session: Session, database) -> None:
112
 
113
 
114
  def _sheet_catch_up(session):
115
- """Read C1 through the existing status function once per Sheet request."""
 
 
 
 
116
  from copy import copy
117
  from core import user_tables
118
  import routes_odoo_tables as rot
@@ -127,7 +131,7 @@ def _sheet_catch_up(session):
127
  if isinstance(context, dict) and "_definitions" in context:
128
  borrowed.runtime = user_tables.lend(borrowed.runtime, **{
129
  user_tables.STORE_KEY: context["_definitions"]})
130
- status = rot.odoo_tables_status(brief=True, session=borrowed).get("catchUp") or {}
131
  if isinstance(memo, dict):
132
  memo["catch_up"] = status
133
  return status
 
112
 
113
 
114
  def _sheet_catch_up(session):
115
+ """Read C1 through the status route's own catch-up reader once per Sheet request.
116
+
117
+ The full status also measures dataset scopes on the Odoo mirror, which no catch-up
118
+ answer needs and which a native binding must never open.
119
+ """
120
  from copy import copy
121
  from core import user_tables
122
  import routes_odoo_tables as rot
 
131
  if isinstance(context, dict) and "_definitions" in context:
132
  borrowed.runtime = user_tables.lend(borrowed.runtime, **{
133
  user_tables.STORE_KEY: context["_definitions"]})
134
+ status = rot._catch_up_status(borrowed) or {}
135
  if isinstance(memo, dict):
136
  memo["catch_up"] = status
137
  return status
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- 73efa05511e649ddca6bdd09ff5c5c0b56a74796eff8e022e71e55473982f664
 
1
+ 48c8e1134f95eaf5dbea7ed1e7b4e0d79914f1ce854b826fd6d78bae9a786770
web/src/typed/openapi.fixture.json CHANGED
@@ -96,6 +96,7 @@
96
  },
97
  "DatabaseName": {
98
  "enum": [
 
99
  "ut_typed_orders",
100
  "ut_typed_products"
101
  ],
@@ -365,6 +366,9 @@
365
  "allOf": [
366
  {
367
  "anyOf": [
 
 
 
368
  {
369
  "$ref": "#/components/schemas/Record_ut_typed_orders"
370
  },
@@ -449,6 +453,10 @@
449
  ],
450
  "type": "object"
451
  },
 
 
 
 
452
  "Record_ut_typed_orders": {
453
  "properties": {
454
  "amount": {
@@ -596,7 +604,7 @@
596
  },
597
  "info": {
598
  "title": "Loopable read API",
599
- "version": "e121958122295a6f3b4591097d6506c634d6d41c0016e79280e5eac5bea82b55"
600
  },
601
  "openapi": "3.1.0",
602
  "paths": {
 
96
  },
97
  "DatabaseName": {
98
  "enum": [
99
+ "ut_activity",
100
  "ut_typed_orders",
101
  "ut_typed_products"
102
  ],
 
366
  "allOf": [
367
  {
368
  "anyOf": [
369
+ {
370
+ "$ref": "#/components/schemas/Record_ut_activity"
371
+ },
372
  {
373
  "$ref": "#/components/schemas/Record_ut_typed_orders"
374
  },
 
453
  ],
454
  "type": "object"
455
  },
456
+ "Record_ut_activity": {
457
+ "properties": {},
458
+ "type": "object"
459
+ },
460
  "Record_ut_typed_orders": {
461
  "properties": {
462
  "amount": {
 
604
  },
605
  "info": {
606
  "title": "Loopable read API",
607
+ "version": "7f79bc1ff4ec8b784d95b8724398d0fb5035704c765f172b4cbdbbcc49154532"
608
  },
609
  "openapi": "3.1.0",
610
  "paths": {
web/src/typed/schema.d.ts CHANGED
@@ -86,7 +86,7 @@ export interface components {
86
  [key: string]: unknown;
87
  };
88
  /** @enum {string} */
89
- DatabaseName: "ut_typed_orders" | "ut_typed_products";
90
  DatabaseSchema: {
91
  database: components["schemas"]["DatabaseName"];
92
  fields: components["schemas"]["Field"][];
@@ -163,7 +163,7 @@ export interface components {
163
  label?: string;
164
  page: components["schemas"]["Page"];
165
  permission_scope_applied?: boolean;
166
- records: ((components["schemas"]["Record_ut_typed_orders"] | components["schemas"]["Record_ut_typed_products"]) & ({
167
  pid: number | string;
168
  } & {
169
  [key: string]: unknown;
@@ -183,6 +183,7 @@ export interface components {
183
  } & {
184
  [key: string]: unknown;
185
  };
 
186
  Record_ut_typed_orders: {
187
  amount?: number | string | null;
188
  ordered_at?: string | null;
 
86
  [key: string]: unknown;
87
  };
88
  /** @enum {string} */
89
+ DatabaseName: "ut_activity" | "ut_typed_orders" | "ut_typed_products";
90
  DatabaseSchema: {
91
  database: components["schemas"]["DatabaseName"];
92
  fields: components["schemas"]["Field"][];
 
163
  label?: string;
164
  page: components["schemas"]["Page"];
165
  permission_scope_applied?: boolean;
166
+ records: ((components["schemas"]["Record_ut_activity"] | components["schemas"]["Record_ut_typed_orders"] | components["schemas"]["Record_ut_typed_products"]) & ({
167
  pid: number | string;
168
  } & {
169
  [key: string]: unknown;
 
183
  } & {
184
  [key: string]: unknown;
185
  };
186
+ Record_ut_activity: Record<string, never>;
187
  Record_ut_typed_orders: {
188
  amount?: number | string | null;
189
  ordered_at?: string | null;