Skip to content

docs(monitoring): say in both configs why an edit needs a deploy - #424

Merged
PBernaerts merged 1 commit into
mainfrom
docs/dep6-config-headers
Aug 21, 2026
Merged

docs(monitoring): say in both configs why an edit needs a deploy#424
PBernaerts merged 1 commit into
mainfrom
docs/dep6-config-headers

Conversation

@PBernaerts

Copy link
Copy Markdown
Owner

DEP-6 task D6-4, the PR B half of the split that #419/#420 used for config.alloy.

What this changes

A header comment at the top of monitoring/loki/loki-config.yml and in the existing header block of monitoring/tautulli-exporter/main.py. Comments only, no code, no config values, no compose changes.

Why

Both files are read once at process start and are single-file bind mounts, so a git pull replaces them by rename and the running container keeps reading the old inode. A plain docker compose up -d applies nothing. Since #422 the DEP-6 homelab.config-sha label does apply an edit, but that fact only lived in the compose labels, which is not where somebody is standing when they edit the file.

Both fail quietly if an edit never loads:

  • loki-config.yml holds retention_period and reject_old_samples_max_age. A retention edit that silently never loaded either deletes logs you believed you were keeping or fills the disk, and both look like a healthy system until the damage is done.
  • main.py defines two of the exporter's own scrape-health metrics, so old code keeps reporting healthy while serving the old numbers.

It is also the proof

The deploy after #422 recreated both services because the labels: block was itself a service-definition change, so it proved nothing about the digest path. This PR changes bytes only. The deploy after it is the one that tests the fingerprint: Created should move and homelab.config-sha should change with nothing else different.

Checks

  • bash tests/run.sh: every suite failed=0
  • pre-commit run --all-files: all hooks pass
  • loki -verify-config in a throwaway grafana/loki:3.7.6 container (no CI gate parses this file): config is valid
  • python3 -m py_compile monitoring/tautulli-exporter/main.py: clean

Loki reads its config once at startup and has no reload endpoint, and Python
reads main.py once when the process starts. Both are single-file bind mounts,
so a git pull swaps the inode under a running container and a plain
`docker compose up -d` applies nothing. Since #422 the DEP-6 hash label does
apply an edit, and these headers say so where somebody is standing when they
edit the file rather than only in the compose labels.

Both files fail quietly if an edit never loads. loki-config.yml holds the
retention settings, so a change that did not take either deletes logs you
believed you were keeping or fills the disk. main.py carries the exporter's own
scrape-health metrics, so stale code keeps reporting healthy while serving the
old numbers.

This is also the content-only change that proves the fingerprint path: the
previous deploy recreated both services because the label block itself was new,
which proves nothing about the digest. The next deploy changes bytes only.
@PBernaerts
PBernaerts merged commit 85f7270 into main Aug 21, 2026
9 checks passed
@PBernaerts
PBernaerts deleted the docs/dep6-config-headers branch August 21, 2026 14:29
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