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
{{ message }}
Repository navigation
Recover first, roll back only a trial channel after consecutive failures #60
On unhealthy checks, recover in place and roll back only after repeated failures, and only a channel in trial.
Problem / intent
Rolling back on a single bad check, or rolling back a version that has already been confirmed, turns transient faults into churn.
Proposed solution
On an unhealthy check, reload the model when outputs are implausible, otherwise restart the application, then restart warm-up. After a configured number of consecutive failures, roll back the most recently switched channel still in trial. When every channel is safe, keep recovering and report without rolling back.
Roll back after consecutive failures: roll back only after update.rollback_after_failures consecutive failures. Every unhealthy check and every unexpected exit counts as one failure; one healthy check resets the count to zero.
Report: log the rollback and record the result rolled_back_health in the state store.
Which channel is rolled back:
Only a channel in trial. When every channel runs its safe version, consecutive failures only repeat step 1 and are reported; nothing is rolled back.
With two channels in trial, the most recently switched one is rolled back first; if consecutive failures continue, the other one is rolled back.
While the application is deliberately stopped because no retained version is compatible (#57), step 1 is not done: the application is neither restarted nor asked to reload its model until a compatible version has been switched in.
Open: what is written to the state store while recovery repeats with every channel safe
Acceptance criteria
Unit test: implausible outputs lead to a model reload; any other unhealthy check leads to an application restart; warm-up restarts after each
Unit test: no rollback before update.rollback_after_failures consecutive failures, and a rollback when the count is reached
Unit test: one healthy check resets the failure count to zero
Unit test: an unexpected exit counts as one failure
Unit test: only the channel in trial is rolled back, and rolled_back_health is recorded
Unit test: with every channel safe, repeated failures cause recovery and a report but no rollback
Unit test: with two channels in trial, the most recently switched one is rolled back first, then the other if failures continue
Unit test: while the application is stopped because no retained version is compatible, no restart or reload is attempted
Each Open item above is defined in the pull request and documented in the repository
No deployment-specific content (organisation, site, equipment model, point table, register map or data sample) in code, tests or docs
make verify passes
Area
area:health — Health checks, watchdog and failure recovery
Summary
On unhealthy checks, recover in place and roll back only after repeated failures, and only a channel in trial.
Problem / intent
Rolling back on a single bad check, or rolling back a version that has already been confirmed, turns transient faults into churn.
Proposed solution
On an unhealthy check, reload the model when outputs are implausible, otherwise restart the application, then restart warm-up. After a configured number of consecutive failures, roll back the most recently switched channel still in trial. When every channel is safe, keep recovering and report without rolling back.
Contract
Setting, read from configuration:
update.rollback_after_failures, the number of consecutive failures before an automatic rollback.Steps on an unhealthy check:
update.rollback_after_failuresconsecutive failures. Every unhealthy check and every unexpected exit counts as one failure; one healthy check resets the count to zero.rolled_back_healthin the state store.Which channel is rolled back:
While the application is deliberately stopped because no retained version is compatible (#57), step 1 is not done: the application is neither restarted nor asked to reload its model until a compatible version has been switched in.
Acceptance criteria
update.rollback_after_failuresconsecutive failures, and a rollback when the count is reachedrolled_back_healthis recordedOpenitem above is defined in the pull request and documented in the repositorymake verifypassesArea