Skip to content

Chore/ha app bestpractises - #647

Open
ChrisHaPunkt wants to merge 18 commits into
hassio-addons:mainfrom
ChrisHaPunkt:chore/ha-app-bestpractises
Open

Chore/ha app bestpractises#647
ChrisHaPunkt wants to merge 18 commits into
hassio-addons:mainfrom
ChrisHaPunkt:chore/ha-app-bestpractises

Conversation

@ChrisHaPunkt

Copy link
Copy Markdown

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 — correct io.hass.type label

  • "addon""app": this is a Community App, not a Supervisor-managed add-on

build.yaml — remove pinned base image versions

  • Deleted the file entirely; the pinned ghcr.io/hassio-addons/base:20.1.1 entries are deprecated in favour of the unpinned base image resolution used by the build system

config.yaml — three improvements

  • watchdog: http://[HOST]:61209 — enables Home Assistant to automatically restart the addon if the Glances HTTP endpoint stops responding
  • init: false — documents that S6-Overlay init is disabled (was already the runtime behaviour)
  • homeassistant_config:rwhomeassistant_config — drops unnecessary write access to the HA config directory; Glances only reads it
  • token: str?token: password? — masks the InfluxDB token in the UI instead of displaying it in plain text

translations/en.yaml — add full English translations

  • Provides human-readable labels and descriptions for every config option shown in the addon UI

ChrisHaPunkt and others added 18 commits May 26, 2026 16:08
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>
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ChrisHaPunkt, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bc62ade4-36ba-451d-8e9d-823ddc748465

📥 Commits

Reviewing files that changed from the base of the PR and between e8411c9 and 7234105.

📒 Files selected for processing (5)
  • glances/Dockerfile
  • glances/build.yaml
  • glances/config.yaml
  • glances/rootfs/etc/services.d/glances/run
  • glances/translations/en.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant