Emit goodbye POST when diagnostics push toggled off#87
Merged
Conversation
airplanes-diagnostics.sh now owns an intent-ack file recording the last diagnostics_enabled state the server has been told. On a REPORT_STATUS transition the next tick sends a goodbye or full payload until the server acks. Full payloads carry diagnostics_enabled=true.
…ewer The intent-ack file becomes stale if a successful full POST is followed by a failed ack-true write. In that case the file still claims the server is muted while the server saw a fresh full payload. The next disable would skip-as-already-acked and the goodbye would never go out. The disabled+acked-false branch now compares LAST_SUCCESS_FILE mtime against INTENT_ACK_FILE mtime; if the success is newer, the ack is treated as stale and the goodbye is sent on this tick. Also clarifies the operator-facing message on apl-feed diagnostics disable to mention the one-shot signal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a feeder owner disables diagnostics push, the website previously had no way to distinguish that from a broken feeder. The collector now owns an intent-ack file that records the last state the server has been told and emits a one-shot minimal payload on every REPORT_STATUS transition, retrying on the natural ~10 min timer cadence until the server acks. Full diagnostics payloads always carry the new diagnostics_enabled flag so the website's view of the state stays authoritative.
The server-side handling (skip Redis write, drop the snapshot, classify the feeder as "muted") lands separately in airplanes-live/website.
Addresses DEV-386 (feeder diagnostics push parent epic).
Addresses DEV-390 (webconfig REPORT_STATUS toggle).