Skip to content

Target SDK State Messages Emitted Instead of State Payloads

Summary

The target SDK emits state messages as singer.StateMessage instead of just passing along the state payload from the tap. This causes a bug where the state thats output isnt valid and grows consistently over time.

Steps to reproduce

Run a meltano elt sync using a target built with the SDK. Afterwards check the payload field in the system database. It should look like {"singer_state": {"bookmarks":... not {"singer_state": {"type": "STATE", "value":...

What is the current bug behavior?

State messages are emitted from the target.

What is the expected correct behavior?

State payloads should be emitted from the target.

Relevant logs and/or screenshots

Possible fixes

https://gitlab.com/meltano/sdk/-/blob/main/singer_sdk/target_base.py#L323