#10366 fix(core): Avoid overwriting state with an empty payload
Pull request opened by
edgarrmondragon
Description
A target that emits an empty state object, and crashed before emitting a more complete state payload, would result in the next run starting the tap with an empty state and thus a full-refresh sync in practice.
Targets shouldn't behave like this, but Meltano can help here by preventing those empty payloads from being persisted.
Checklist
• I have read the
contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Co-written-by: Claude Code following
the agentic coding guidelines
Related Issues
•
meltano/sdk#3040
Summary by Sourcery
Preserve existing incremental state when targets emit empty Singer state payloads.
Bug Fixes:
• Prevent empty or null Singer state payloads from overwriting previously persisted incremental state, avoiding unintended full-refresh syncs after target failures.
Tests:
• Add coverage confirming empty state payloads are ignored, logged, and leave job and persisted state unchanged.
meltano/meltano