Chore/ha app bestpractises - #647
Conversation
Glances v4 requires explicit --export flag, but combining it with -w (webserver mode) triggers 'Export is only available in standalone or client mode' and exits. Run a separate lightweight Glances instance in quiet/standalone mode for exports while the webserver runs without --export.
This is a Home Assistant Community App, not an addon. The OCI vendor
label already reflects this ("Home Assistant Community Apps").
Enables HA to auto-restart the addon when the Glances web server becomes unresponsive.
Provides user-friendly labels and descriptions for all configuration options in the HA UI.
Build configuration belongs in config.yaml per current HA developer docs. The ARG in the Dockerfile already specifies BUILD_FROM.
Glances only reads system metrics, it never writes to the HA config directory. Removed unnecessary :rw access.
S6-Overlay cannot be used with host_pid: true (requires PID 1). Make this explicit in config.yaml to match the Dockerfile's ENTRYPOINT [] override.
The InfluxDB token is a secret and should be masked in the UI, consistent with the password field.
The exporter process built its own argv and did not include the --disable-process flag when process_info was false, causing inconsistent behavior between the webserver and exporter.
Consistent with the reclassification of Glances as an app.
When InfluxDB export is enabled, both processes now run in the background with `wait -n` to detect the first exit. SIGTERM is forwarded to both children for clean shutdown from the HA UI. Without an exporter, the webserver runs via exec as before.
Use a SHUTTING_DOWN flag so SIGTERM/INT from HA exits cleanly (0) instead of logging a fatal error and exiting 1.
Co-authored-by: Copilot <copilot@github.com>
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Overview
Aligns the Glances Community App with current hassio-addons best practices. This is a separate PR from the InfluxDB bug fix — it contains no functional changes to Glances behaviour.
Changes
Dockerfile— correctio.hass.typelabel"addon"→"app": this is a Community App, not a Supervisor-managed add-onbuild.yaml— remove pinned base image versionsghcr.io/hassio-addons/base:20.1.1entries are deprecated in favour of the unpinned base image resolution used by the build systemconfig.yaml— three improvementswatchdog: http://[HOST]:61209— enables Home Assistant to automatically restart the addon if the Glances HTTP endpoint stops respondinginit: false— documents that S6-Overlay init is disabled (was already the runtime behaviour)homeassistant_config:rw→homeassistant_config— drops unnecessary write access to the HA config directory; Glances only reads ittoken: str?→token: password?— masks the InfluxDB token in the UI instead of displaying it in plain texttranslations/en.yaml— add full English translations