Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the bad user ids #65

Merged
merged 4 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5
* Log the id for the users found outside of the queried window [#65](https://github.com/singer-io/tap-zendesk/pull/65)

## 1.5.4
* Log Request URL (and URL params), Response ETag, and Response 'X-Request-Id' header to help with troubleshooting [#63](https://github.com/singer-io/tap-zendesk/pull/63)

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.4',
version='1.5.5',
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 @@ -200,8 +200,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