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
fix(webapp,run-engine): address review findings on the snapshot store wiring
The sweep handler caught its own failure, logged it and returned, which
acknowledges the job. The dead-letter path is what re-enqueues the next
occurrence, and only a throw reaches it, so one transient failure would have
stopped the sweep for good. It now rethrows after the outcome is recorded.
The save guard only covered the global dial, so an organisation could be set
past off with no connection configured and silently do nothing, which is the
exact silence the guard exists to prevent. It now covers both keys and runs on
the organisation routes as well. A companion check refuses the
per-organisation key on a global save, where nothing reads it.
Invalidation read the replica immediately after a primary write, so replica lag
could re-cache the value the write had just replaced and hold it for the whole
cache window. That is worse than not invalidating at all. Invalidation now
drops the entry and re-reads from the primary; the background warm-up keeps the
replica.
A pass cancelled at shutdown reported itself as failed. It now reports aborted.
Metric attributes are bounded at the adapter and in the engine's option type.
The values were already bounded in practice, but both sides typed them as
plain strings, so an unrecognised value now collapses to a single bucket rather
than minting a time series.
Also drops mocks from the boot test, which the injected dependencies made
unnecessary, and replaces a dial position in the run-store test that no longer
exists.
return`Cannot set ${FEATURE_FLAG.snapshotStoreMode} to "${mode}": RUN_ENGINE_SNAPSHOT_STORE_REDIS_HOST is not configured in this deployment, so the snapshot store is never constructed and the flag would have no effect.`;
16
+
// Both keys, because either one past `off` is equally silent without a connection.
return`Cannot set ${key} to "${value}": RUN_ENGINE_SNAPSHOT_STORE_REDIS_HOST is not configured in this deployment, so the snapshot store is never constructed and the flag would have no effect.`;
21
+
}
19
22
}
20
23
21
24
returnundefined;
22
25
}
26
+
27
+
/**
28
+
* Refuses an organisation-only key on a global save. Nothing reads the global row for it, so a
29
+
* value saved there is inert, and an inert control an operator can set is worse than no control.
30
+
*/
31
+
exportfunctionglobalOnlySnapshotStoreFlagError(
32
+
requested: Record<string,unknown>
33
+
): string|undefined{
34
+
if(FEATURE_FLAG.snapshotStoreOrgModeinrequested){
35
+
return`${FEATURE_FLAG.snapshotStoreOrgMode} is per-organisation only; nothing reads it from the global flags, so setting it here would have no effect.`;
0 commit comments