Add an on-demand "Probe now" trigger for the DoH canary probe (D-0057) #137
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/doh-probe-now"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Adds an on-demand Probe now button to
/configuration#doh-blocklistthat forces an immediate DoH canary-probe cycle instead of waiting for the periodic interval (default 6 hours). This makes the D-0056 ladder (and any future probe change) measurable without restarting the PipelineHost (D-0057).How it works
The probe worker runs in the PipelineHost while the Admin UI/API run in the AdminApi, so the trigger is a cross-process signal over Postgres LISTEN/NOTIFY, following the same pattern as the settings refresh loops:
IDohProbeTriggerabstraction. Postgres implementation publishes withpg_notifyon channelviegard_doh_probe_nowand, on the wait side, listens on it. The wait is sliced into 60-second segments so no LISTEN connection is held for the full multi-hour interval (matching the settings refresh cadence). In-memory implementation covers single-process/dev use.DohProbeWorkernow waits on the trigger instead of a plain delay, so a request wakes it early while it still runs at startup and everyProbeInterval.POST /configuration/doh/probe-now(authenticated, antiforgery-protected, rate-limited, audited) publishes the request. It rejects the request with an explanatory message when the blocklist or probing is disabled, so the button is not a silent no-op. Requests are coalesced.Deliberate boundaries
How was this tested?
dotnet build Viegard.slnx- 0 warnings, 0 errorsInMemoryDohProbeTriggertests (wake after request, no-request timeout, request coalescing)Checklist