Skip to content

sitescope 1.6.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 16:23
· 14 commits to master since this release
v1.6.0
16544f9

sitescope 1.6.0

TOML. The config may now be config.toml, written by a person, with the
same keys, defaults and checks as JSON. The NixOS module still writes
JSON, so NixOS hosts see no change. Every config example in the docs
comes in TOML, JSON and Nix.

Features

  • A config ending in .toml is read as TOML, and one ending in .json as
    JSON. Both go through the same strict loader, so an unknown key fails
    the same way, with its path; a TOML syntax error gives its line.
  • The CLI looks for /etc/sitescope/config.toml as well as
    config.json, and asks you to remove one if both exist.
  • sitescope config prints the effective config as TOML; -format json
    prints JSON, and -format nix prints NixOS settings.
  • sitescope config -defaults prints every key with its built-in default,
    without reading a config. The configuration reference on the site is
    that output with comments, and a test keeps the two equal.
  • The docs' config examples are written in TOML; the site build adds
    JSON and Nix versions, as tabs, with the same writer as
    sitescope config. A flake check evaluates that writer's Nix against
    the JSON it came from.
  • Durations print without zero units: "1h", not "1h0m0s".
  • The effective config shows two defaults it used to leave out: an HTTP
    target's latency and mail.banner.latency.

Bug fixes

  • dns.delegationZones was accepted but never used. It's gone, so a
    config that sets it fails to load instead of doing nothing.

Breaking changes

  • sitescope config prints TOML by default. Use -format json for the
    1.5.0 output.
  • dns.delegationZones fails to load. Remove it.
  • A config file must end in .toml or .json.

Upgrade notes

  • Pin the release commit in the infra flake and redeploy, then sitescope unlock on the hub host.
  • A JSON config needs no change. To move a hand-written one to TOML,
    write config.toml, run sitescope config -config config.toml -check,
    and point the unit at it.
  • Rollback:
    • To 1.5.x, two-way, while the config stays JSON. 1.5.x can't read
      config.toml, and refuses it rather than guessing, so roll a TOML
      config back to its JSON form along with the binary.
    • To 1.4.2, one-way, as for 1.5.0: restore the 1.4 config too.
  • Verify: the footer and /status.json show 1.6.0+<rev>, and the check
    count is the same as before the upgrade.