Repository navigation
Closed
Labels
priority: highHigh prioritytype: bugSomething isn't workingworkload: hoursLikely takes hours to resolve
Milestone
Description
Mixed bag of low findings from the pre-release review of 0.19.0 (plugin store, #557, #560), to fix before the release:
- Store DB with access control and no
dbsection:register_access_controladds the policy database todb.dbswhen the app has nodbsection, and the plugin store then takes it as the app's first database: plugin entries land next to the Casbin policies and the listing saysstorage: shared, while the docs say "without database, each process keeps its entries in memory". The store must only use the app's own databases (memory/localmode otherwise); regression test. - Memory store is unbounded: document that entries in memory have no size limit (no namespace limit in v1), recommend a short
max_ttlwithout a database, and log a warning once at startup when a plugin that declares stored data uses the store without a database (per process; per-process budgets with several workers). -
max_ttlapplies only on writes: loweringmax_ttlleaves existing entries readable until their original expiry. Cap reads at the currentmax_ttl; document retention and a cleanup for loweredmax_ttland turned-off stores. - Docs: per-user budget example raises
ValueErrorfor anonymous callers (subject is None); handle it. - Docs:
get(key, default)with storednullreturnsNone, notdefault; reword the docs (keep the behaviour). - Listing spec version: the listing gained required fields (
data_stored,storage) butinfo.versionis still 1.0.0; bump it and document that plugins usingctx.storeordata_storedneedfoca>=0.19. - Permanent index errors: log
OperationFailurecodes 85, 86 and 13 (index options/key conflicts, unauthorized) at startup at error level with the cause, instead of a warning.
Not in scope: key_for() unkeyed SHA-256 vs. a keyed hash (needs a maintainer decision).
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype: bugSomething isn't workingworkload: hoursLikely takes hours to resolve
Activity
fix(plugins): cap store expiry without indexes