Skip to content

Commit

Permalink
fix: Write a valid final state message at the end of each stream sync (
Browse files Browse the repository at this point in the history
…#1164)

Co-authored-by: Eric Boucher <[email protected]>
  • Loading branch information
laurentS and ericboucher authored Nov 10, 2022
1 parent 0a7f086 commit ff3d65e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions singer_sdk/tap_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ def sync_all(self) -> None:

stream.sync()
stream.finalize_state_progress_markers()
stream._write_state_message()

# this second loop is needed for all streams to print out their costs
# including child streams which are otherwise skipped in the loop above
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_countries_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ def tally_messages(messages: list) -> Counter:
assert counter["SCHEMA", "countries"] == 1
assert counter["BATCH", "countries"] == 1

assert counter[("STATE",)] == 2
assert counter[("STATE",)] == 4

0 comments on commit ff3d65e

Please sign in to comment.