Skip to content

Commit f72bf1b

Browse files
SAC-29666: Update clear_offset to remove offset key from bookmark (#184)
* update clear_offset to remove key from bookmark ----------------------------- Co-authored-by: Ben Allred <[email protected]> * bump version to 5.15.0 ----------------------------- Co-authored-by: Ben Allred <[email protected]> --------- Co-authored-by: Leslie VanDeMark <[email protected]>
1 parent 73e3695 commit f72bf1b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 5.15.0
4+
* Update clear_offset to remove offset bookmark [#184](https://github.com/singer-io/singer-python/pull/184)
5+
36
## 5.14.3
47
* Default type for non-standard data types is string [#181](https://github.com/singer-io/singer-python/pull/181)
58

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import subprocess
55

66
setup(name="singer-python",
7-
version='5.14.3',
7+
version='5.15.0',
88
description="Singer.io utility library",
99
author="Stitch",
1010
classifiers=['Programming Language :: Python :: 3 :: Only'],

singer/bookmarks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def set_offset(state, tap_stream_id, offset_key, offset_value):
3131
return state
3232

3333
def clear_offset(state, tap_stream_id):
34-
state = ensure_bookmark_path(state, ['bookmarks', tap_stream_id, "offset"])
35-
state['bookmarks'][tap_stream_id]["offset"] = {}
36-
return state
34+
return clear_bookmark(state, tap_stream_id, "offset")
3735

3836
def get_offset(state, tap_stream_id, default=None):
3937
return state.get('bookmarks', {}).get(tap_stream_id, {}).get("offset", default)

0 commit comments

Comments
 (0)