MetPX / MetPX/sr_insects

Flow tests don't catch v02 post format regressions

Open
#85 3 comments 0 reactions 1 assignee View on GitHub

@robjarawan is already working on this.

Since Mar 25, 2026.

Dominant language
Shell
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

what

PR MetPX/sarracenia#1604 (shallow copy in putNewMessage) broke v02 posting with an AttributeError, but the dynamic_flow tests didn't catch it. Reid found it on a live system.

The sender config tsource2send_f50.conf does set post_topic_prefix v02.post, so in theory it should exercise the v02 export path. But this regression shipped without any test failure.

the gap

The flow_check.sh validation counts messages and compares totals, but doesn't verify that posted messages are actually well-formed v02. If the sender crashes on the v02 export, the messages just don't get posted, and the test might still pass if the counts happen to match from other paths.

There's no test that:

  1. Posts a message explicitly in v02 format
  2. Subscribes to it and verifies it was received with valid v02 structure
  3. Fails if the v02 export path crashes
suggestion

A minimal addition to the dynamic flow test (or a standalone test) that:

  • Configures a post component with post_topicPrefix v02.post
  • Posts at least one message
  • Has a subscriber with topicPrefix v02.post that receives it
  • Validates the message was actually received (not just that counts match)

Alternatively, a targeted check in flow_check.sh that greps the sender logs for v02 export errors.

context

The regression fix is in MetPX/sarracenia#1629. The unit test there covers v2wrapper.Message with both plain dicts and Message objects. But a flow-level test in sr_insects would have caught this before it hit production.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.