Repository navigation
ADR 0055 Deploy Maintenance Window
Accepted (2026-10-27)
Every deploy of the live stack restarts the Device-Gateway. For a second or two the mower is seen offline, and Notifications sent mower_offline and mower_online to every device (seen 2026-10-24 and 2026-10-27). The owner declined a general offline grace period: a real outage must still be reported at once. So the deploy has to tell Notifications that the next link loss is its own doing.
A maintenance window in Notifications' database. One row (table maintenance_window, id = 1, migration 0008): opened_at, expires_at, closed_at, reason. It expires by itself (the deploy asks for 15 minutes; the CLI accepts at most MOWDECK_NOTIFICATIONS_MAINTENANCE_MAX_MINUTES, default 60), so a forgotten window cannot silence alerts for long. There is no HTTP endpoint and no authentication surface: the window is written by a command inside the notifications container, which already holds the database credentials.
CLI. python -m notifications.cli maintenance open --minutes 15 --reason "deploy 0.9.0", maintenance close, maintenance status. The deploy runs them with docker compose exec -T notifications .... The output is one line and never contains a secret.
Suppression of the pair, not of the kinds. Only mower_offline and mower_online are affected; they are the only link-state kinds. Theft alarms (mower_lifted, mower_left_dock_unexpectedly, geofence_exit), errors of the mower (mower_stuck) and all other kinds are never held. A mower that goes offline is held back (the watch is offline with offline_held, nothing is sent) when the offline began between opened_at - lead (default 60 s: the last state arrived shortly before the restart) and the end of the window (the close, at the latest the expiry), and it is noticed no later than the end plus a grace (default 120 s). Because no offline went out, no online follows. If the mower comes back, the hold is simply cleared. The offline timer also sweeps held watches: when the window and its grace are over and the mower is still offline, mower_offline is sent then, so a mower that really died during the deploy is reported two minutes after the close at the latest. An offline that began before the window (a real earlier outage) or that is noticed after the grace is sent as always.
Deploy script. infra/compose/deploy.sh <version> runs the documented procedure (fetch tags, backup, checkout, verify-release.sh, set MOWDECK_VERSION, pull, up -d --no-build --wait) with the window opened after the pull and closed after up --wait, also when up fails. Opening is best effort: the first deploy of a build that has the window still runs the old notifications image without the command, so the script warns and goes on (that one deploy may still send the pair).
Deploys are silent for the owner; real outages that coincide with a deploy are reported at most about two minutes after the close, otherwise immediately. The window is global to the installation (one stack), not per account. Replicas read the window with a two second cache. Helm: the chart has no hook yet; a pre/post-upgrade Job running the same CLI is possible and left for later. A banner for operators in the web app is not part of this decision.
Mirrored from docs/adr/0055-deploy-maintenance-window.md at commit 7286f275f5353d8aa6206a28f7f94b32484722e7. Edit the file in the repository, not this wiki page.
Mirrored from the docs/ directory at commit 7286f275f5353d8aa6206a28f7f94b32484722e7. Edit the files in the repository, not this wiki.
MowDeck documentation
- Home
- Phases
- Architecture
-
Decisions (ADR)
- Architecture decisions
- ADR 0001: OpenFGA instead of self-built authorization
- ADR 0002: Self-built Identity service in FastAPI instead of Keycloak or Zitadel
- ADR 0003: SvelteKit for the web app
- ADR 0004: Monorepo with a uv workspace
- ADR 0005: AGPL-3.0 for services and apps, Apache-2.0 for libraries
- ADR 0006: PostgreSQL for all persistence, no SQLite
- ADR 0007: NATS JetStream as event bus
- ADR 0008: Traefik as gateway
- ADR 0009: Command and event envelopes, subject naming and de-duplication
- ADR 0010: Python 3.13 for all services and libraries
- ADR 0011: Separate GPL-3.0 package for the PyMammotion adapter
- ADR 0012: Mower control interface and safety rules
- ADR 0013: Device-Gateway registry, sharding and per-mower concurrency
- ADR 0014: Authorization model, tuple ownership and the mowdeck-authz client
- ADR 0015: Tokens, sessions and key rotation
- ADR 0016: Fleet commands and authorization per command kind
- ADR 0017: Telemetry storage and retention
- ADR 0018: Realtime WebSocket protocol
- ADR 0019: Mammotion adapter transports, manual drive and secrets
- ADR 0020: Web app architecture
- ADR 0021: Browser authentication flow
- ADR 0022: Notifications: rules, recipients and delivery
- ADR 0023: Map rendering and projection
- ADR 0024: Scheduler: recurrence, rain pause and command issuing
- ADR 0025: Home Assistant integration as a pure API client
- ADR 0026: Manual drive channel over the Realtime WebSocket
- ADR 0027: Health history and theft alarm
- ADR 0028: Entitlements: plans as data and enforcement
- ADR 0029: Helm chart and release pipeline
- ADR 0030: Mowing patterns as plug-ins and the Planner
- ADR 0031: Billing with a Stripe adapter
- ADR 0032: Live camera over Agora, joined directly by the browser
- ADR 0033: Vision-assisted recovery with human approval
- ADR 0034: Linked cloud accounts and device discovery
- ADR 0035: Server-side camera frames and automatic AI analysis on errors
- ADR 0036: Native app shells with Capacitor, loading the web app from the server
- ADR 0037: Camera panorama calibration in the browser, with the AI supplying points only
- ADR 0038: Dual link per mower and firmware updates
- ADR 0039: Spot mowing by MowDeck-driven paths
- ADR 0040: Link heartbeat for online status
- ADR 0041: Spot runs from the dock: undock, transit and return
- ADR 0042: Drive calibration
- ADR 0043: Turn styles
- ADR 0044: Drive view with camera
- ADR 0045: Camera relay
- ADR 0046: Device settings as capabilities
- ADR 0047: The RTK base station as a Fleet device
- ADR 0048: Maintenance commands
- ADR 0049: Manual driving over the Mammotion cloud
- ADR 0050: Passkeys and the app login hand-off
- ADR 0051: Sign in with GitHub
- ADR 0052: Sign in with Apple
- ADR 0053: Retention and downsampling of the position track
- ADR 0054: Aerial photo under the mower map
- ADR 0055: Deploy maintenance window
- ADR 0056: Camera photo in push notifications for errors and theft alarms
- ADR 0057: Step-up re-authentication for critical actions
- ADR 0058: Theft tracking mode
- ADR 0059: iOS widgets and the mowing Live Activity
- ADR 0060: Apple Watch app
- ADR 0061: Mowing angle rotation
- ADR 0062: Setup tour for new users
- ADR 0063: Matter server (mowers in Apple Home and Google Home)
- ADR 0064: Personal access tokens and the public API documentation
- ADR 0065: Security center and new-login alerts
- ADR 0067: Error code lexicon, provider independent
- ADR 0068: Public demo mode
- Development
-
Operations
- Operating the Compose stack
- Operating MowDeck on Kubernetes (Helm)
- Building the Bluetooth bridge (ESPHome on a XIAO ESP32-S3)
- Releases
- Billing operations
- Telemetry: retention and position downsampling
- iPhone and Android apps
- Passkeys
- Sign in with GitHub
- Aerial photo under the map
- Sign in with Apple
- Theft tracking mode
- Matter server
- Source code offer (AGPL-3.0 section 13)
- Public demo
- Spikes
-
Guides
- Guides
- ESP32 bridge: purchase and setup
- Signing in with a passkey
- Signing in with GitHub
- Error codes in plain words
- Aerial photo under the map
- Signing in with Apple
- Confirming critical actions
- Your security page
- iPhone widgets and the mowing Live Activity
- Apple Watch
- The setup tour
- Apple Home and Google Home (Matter)
- Scripting MowDeck
- API reference
- Original plan (German)