Skip to content

Commit

Permalink
Log the bad user ids (#65)
Browse files Browse the repository at this point in the history
* Log the bad user ids

* Bump to v1.5.5 and update changelog [skip ci]
  • Loading branch information
cosimon authored Sep 15, 2021
1 parent 9c9051d commit e3ebc9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.5.6
* Log the id for the users found outside of the queried window [#65](https://github.com/singer-io/tap-zendesk/pull/65)

## 1.5.5
Changes introduced in [#64](https://github.com/singer-io/tap-zendesk/pull/64)
* Add to setup.py a "test" extra_requires so that CI doesn't have to install ipdb
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='tap-zendesk',
version='1.5.5',
version='1.5.6',
description='Singer.io tap for extracting data from the Zendesk API',
author='Stitch',
url='https://singer.io',
Expand Down
7 changes: 5 additions & 2 deletions tap_zendesk/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ def sync(self, state):
time.sleep(30)
num_retries += 1
continue
raise AssertionError("users - Record found before date window start and did not resolve after 30 minutes of retrying. Details: window start ({}) is not less than or equal to updated_at value(s) {}".format(
parsed_start, [str(user.updated_at) for user in users if user.updated_at < parsed_start]))
bad_users = [user for user in users if user.updated_at < parsed_start]
raise AssertionError("users - Record (user-id: {}) found before date window start and did not resolve after 30 minutes of retrying. Details: window start ({}) is not less than or equal to updated_at value(s) {}".format(
[user.id for user in bad_users],
parsed_start,
[str(user.updated_at) for user in bad_users]))

# If we make it here, all quality checks have passed. Reset retry count.
num_retries = 0
Expand Down

0 comments on commit e3ebc9a

Please sign in to comment.