Skip to content

smokeng v0.19.0

Choose a tag to compare

@Timdebruijn Timdebruijn released this 03 Sep 07:47
· 8 commits to main since this release

v0.19.0 — a SmokePing import arrives as text

SmokePing renders title, menu and remark as HTML, and its configs use that:
entities for punctuation, for emphasis,
for a break. smokeng renders
them as text. The importer copied the markup through, so a migrated tree
displayed "—" where a dash belonged and "" around a word — sixteen and
ten of them on a real migration, corrected by hand one title at a time before
anyone worked out what they were.

Tags are removed before entities are decoded, so a config that escaped a
literal "" keeps it as text rather than losing it on a second pass. A bare
"<" is left alone: a tag has to start with a letter, and "latency < 5ms" is
ordinary prose in a remark.

The continuation rule was wrong in a way that could join lines that had nothing
to do with each other. SmokePing continues a value when it ends with a
backslash — its own parser reads while (/\\$/) { s/\\$//; ... $_ .= ' ' . $n }
— and this importer keyed on indentation instead, which both missed genuine
continuations and glued unrelated indented lines onto the value above. It also
kept the backslash, so every wrapped sentence carried a stray one.

Two narrower cases of the same thing came out of review. A continuation takes
the very next line, whatever it is: SmokePing reads that one straight from the
file handle, so a blank line ends the value rather than being stepped over, and
a dangling backslash no longer swallows the key that follows it. And a comment
is removed before anything decides whether a line continues, so a backslash
inside one does not continue the value.

None of this reaches a tree that has already been imported; that has to be
repaired where it stands, with config export, an edit, and config import.

Also: the Ansible role restarts the prober when the binary changes. It notified
only the master, so replacing the file left the prober running the release it
started with — four behind, on one host.