Skip to content

deps: go-sparkplugb v0.10.0; host and app print one death per edge node death (v0.8.0) - #44

Merged
boeboe merged 1 commit into
mainfrom
deps/go-sparkplugb-v0.10.0
Dec 1, 2026
Merged

boeboe merged 1 commit into
mainfrom
deps/go-sparkplugb-v0.10.0

Conversation

@boeboe

@boeboe boeboe commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What

  • go-sparkplugb moves from v0.9.0 to v0.10.0 (go get, go mod tidy).
  • The release workflow already pins go-binary-release.yml at v3.9.0, so no workflow pin changes.
  • sparkplugbctl uses the MQTT 3.1.1 PahoTransport and no mqtt5 path, so the go-sparkplugb mqtt5 module is not taken.

Behaviour for users (RELEASE.md v0.8.0)

  • Breaking: host and app no longer print a second [NDEATH] line for one death. The same holds for app --json.
    • go-sparkplugb v0.10.0 ignores an NDEATH of an edge node that is already offline.
    • Such a second NDEATH is the will that the broker publishes after an MQTT 5.0 edge node's own NDEATH and its DISCONNECT with reason code 0x04 (Sparkplug B 3.0, 6.4.25), or the same NDEATH delivered twice.
    • go-sparkplugb mqtt5/v0.2.0 edge nodes now send that DISCONNECT, so the case is ordinary.
    • The JSON output is a contract (AGENTS.md hard rule 1), so this is a minor release with a Breaking note.
  • Changed:
    • A connection lost while the command connects now ends edge, host and app with exit 4 and connect: …. Before, the command could go on with a connection that had ended.
    • With edge --primary-host, Ctrl+C during the walk ends the walk.
    • A late STATE or command for an ended connection is ignored.
  • Unchanged: commands, flags, exit codes, the format of the JSON lines, and edge's plain DISCONNECT (Paho does not implement mqtt.WillDisconnecter).

Evidence

  • TestSecondNDEATHPrintedOnce (cmd/ndeath_test.go):
    • It captures the edge node's own NDEATH and publishes it again, as the broker does with the will.
    • Then it waits for a later node's death and checks for exactly one death line, for host, app and app --json.
    • It passes on v0.10.0 (5 runs, -race) and fails on v0.9.0 with "deaths of g/n printed 2 times, want 1".
  • make check: green locally, including lint, vuln and docs-check. Coverage is 98.9% (gate 90%).
  • README.md (host, app) and docs/json-output.md (app) state that each death is printed once.

🤖 Generated with Claude Code

…de death (v0.8.0)

go-sparkplugb v0.10.0 ignores an NDEATH of an edge node that is already
offline: the will that the broker publishes after an MQTT 5.0 edge node's
NDEATH and DISCONNECT 0x04 (Sparkplug B 3.0, 6.4.25), or a redelivery.
host and app therefore no longer print a second [NDEATH] line (or JSON
line) for one death. TestSecondNDEATHPrintedOnce republishes the edge
node's own NDEATH and checks one line for host, app and app --json; it
fails on v0.9.0.

Also from v0.10.0: a connection lost while connecting ends the command
with exit 4; Ctrl+C during the primary-host walk ends the walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boeboe
boeboe merged commit dbb6574 into main Dec 1, 2026
15 checks passed
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