Skip to content

v1.18.0

Choose a tag to compare

@jeyrb jeyrb released this 14 Nov 15:13
· 35 commits to main since this release
Immutable release. Only release title and notes can be modified.

First steps in protecting against supply chain attacks, from RFC 0002, see Supply Chain Protection

✨ Enhancements

Supply Chain Protection

  • Updates now install exactly the image digest found by the last scan, rather than pulling the tag, so a tag moved between the scan and the install can't swap in a different image
    • The digest is pulled, e.g. eclipse-mosquitto@sha256:..., then tagged locally as before, so Docker Compose and Portainer use it unchanged
    • If the digest is no longer in the registry, the update is abandoned rather than falling back to the tag, and the next scan finds the new digest
  • New release history records when each image digest was first seen, in release_history.json next to config.yaml, so it survives container recreation and Updates2MQTT updating itself
  • A full version tag, such as 2.0.18, found pointing at a different digest is logged and reported in a new tag_moved attribute
  • Update cooldown, how long a release has to be known before it's eligible to install, is calculated and reported in a new cooldown attribute, but not yet enforced
    • Defaults to 3d, set with cooldown in the docker config section, or per container with the updates2mqtt.cooldown label or UPD2MQTT_COOLDOWN env var
    • Measured from first sighting, or the GitHub release publication time if that's later, as an image's own creation time can't be trusted
    • A future release will hold back Auto updates until their cooldown has passed, with notice given first
  • GitHub release publication time is captured as published in the release attributes

Container selection

  • Easily exclude experimental or one-off containers
    • New container_select option in the docker config section ignores containers completely by name, e.g. experimental ones with exclude: ["^lab_", "^beta_"]. No patterns are set by default
    • Ignored containers aren't checked against registries or published, and anything published for them before is cleared at the next topic clean

Single MQTT connection

  • Topic cleaning now runs on the main MQTT connection, rather than opening a second one
  • The container healthcheck no longer connects to MQTT. It reads a heartbeat file the app writes, recording when the app last ran its heartbeat, and when the broker last acknowledged one
    • A stalled app is still restarted, as before. A broker that hasn't acknowledged a heartbeat marks the container unhealthy, without restart loops while the broker is down
    • The file defaults to updates2mqtt.heartbeat in the system temp directory. Set U2M_HEARTBEAT_FILE to move it, for both the app and the healthcheck, or heartbeat_file in the node.healthcheck config section for the app alone
    • Existing compose healthchecks that pass the heartbeat topic still work, and the topic is no longer needed

🐞 Bug Fixes

  • Brokers set to use the username as the client id, such as EMQX with Use Username as Client ID, no longer take over Updates2MQTT's session every time topics are cleaned or the healthcheck runs, which showed as repeated Disconnect failure from broker ... Session taken over warnings and could cause update commands to be missed
  • Topic cleaning no longer reacts to its own deletes, which could keep it deleting until its time limit
  • A registry rate-limit response asking for a sub-second wait, such as GHCR's retry-after: 22.232µs, now pauses that registry for 1 second rather than 15 minutes
    • The wait is also read from the registry's error message when there's no Retry-After header, as GHCR does

📝 Other changes

  • All GitHub Actions in the build and release workflows are now pinned by commit SHA, kept up to date by Dependabot
  • niquests (http client) moved from dev to primary dependency in pyproject.toml

📚 Documentation

  • Improving Security now covers restricting MQTT update commands with a Mosquitto ACL, and limiting Docker API access
  • Design docs reorganized into RFCs, with the OCI client as RFC 0001, cyber security as RFC 0002 and configuration as RFC 0003
  • Design Principles added

Full Changelog: v1.17.6...v1.18.0