Skip to content

Flow tests don't catch v02 post format regressions #85

Description

@robjarawan
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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions