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
spp_base_common/models/ir_module_module.py's menu-icon decoration hook calls self.env.ref(...) during registry load. Two hardening gaps:
env.ref without raise_if_not_found=False — a missing xmlid raises during
registry load, which is fatal to whatever process is loading the registry.
No tolerance for an aborted transaction: in a recent job-worker incident, a UniqueViolation elsewhere poisoned the cursor, and this hook's _xmlid_lookup
then raised InFailedSqlTransaction on every registry (re)load — repeatedly
killing the odoo-job-worker thread until the database was quarantined
(fix(worker): survive a job-level database error instead of quarantining the DB odoo-job-worker#22 hardened the worker side; this is the first-order
fix). Decorating app menu icons should never be able to take a worker down.
Proposed direction: raise_if_not_found=False plus a defensive try/except around
the lookup that logs and skips decoration on any DatabaseError — cosmetic feature,
best-effort semantics. A regression test that runs the hook on a deliberately
aborted cursor and asserts registry load survives.
spp_base_common/models/ir_module_module.py's menu-icon decoration hook callsself.env.ref(...)during registry load. Two hardening gaps:env.refwithoutraise_if_not_found=False— a missing xmlid raises duringregistry load, which is fatal to whatever process is loading the registry.
UniqueViolationelsewhere poisoned the cursor, and this hook's_xmlid_lookupthen raised
InFailedSqlTransactionon every registry (re)load — repeatedlykilling the odoo-job-worker thread until the database was quarantined
(fix(worker): survive a job-level database error instead of quarantining the DB odoo-job-worker#22 hardened the worker side; this is the first-order
fix). Decorating app menu icons should never be able to take a worker down.
Proposed direction:
raise_if_not_found=Falseplus a defensive try/except aroundthe lookup that logs and skips decoration on any
DatabaseError— cosmetic feature,best-effort semantics. A regression test that runs the hook on a deliberately
aborted cursor and asserts registry load survives.
Scoped out of OpenSPP/odoo-job-worker#22 by its author.