-
Notifications
You must be signed in to change notification settings - Fork 38
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
TDL-15454 removed the buffer system #77
base: master
Are you sure you want to change the base?
Conversation
test/unittests/test_yield_records.py
Outdated
@mock.patch('tap_zendesk.streams.TicketMetrics.sync') | ||
@mock.patch('tap_zendesk.streams.TicketComments.sync') | ||
@mock.patch('tap_zendesk.streams.CursorBasedExportStream.get_objects') | ||
def test_yield_records(mock_objects, mock_comments_sync, mock_metrics_sync, mock_audits_sync, mock_comments, mock_metrics, mock_audits, mock_get_bookmark, mock_update_bookmark): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments in unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -308,12 +275,12 @@ def emit_sub_stream_metrics(sub_stream): | |||
self.update_bookmark(state, utils.strftime(generated_timestamp_dt)) | |||
|
|||
ticket.pop('fields') # NB: Fields is a duplicate of custom_fields, remove before emitting | |||
should_yield = self._buffer_record((self.stream, ticket)) | |||
yield (self.stream, ticket) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for yielding self.stream? instead of just ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the buffer_records also had self.stream passed as an argument. And it helps in identifying which stream is yielded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes because earlier it is required to identify the stream in function _buffer_record
as there is login on the stream name, I don't see that logic now, do we still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a comment regarding why we are yielding stream name and rec in the code
….com/singer-io/tap-zendesk into TDL-15454-remove-buffer-from-tickets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code walk through required
* API call to the each stream in discovery mode done * removed generated catalog file * resolved pylint errors * Resolved cyclic import pylint error * Improved unittest case civerage * Updated error message for 403 forbidden error * Updated error handling * resolved pylint error * Removed empty catalog * Removed unused catalog file. * Removed unused state file * Removed unused state file * Removed unused file * Updated error message and unittest case for 404 error * Updated check access method * Resolved pylint error * recolved unused argument error * resolved kwargs error * Updated unittest cases * Updated unittest cases * Removed global variable * Improved unittest case coverage * updated 404 error * resolved pylint error * Updated typo error. * Removed f strings * Updated error handling * resloved pylint error * resolved unittest case error * Added more comments and updated code * resolved pylint error * updated method name * Added timeout error code * Resolved pylint error * added coverage report to artifact * added pylint back * Added comment * resolved pylint errors * Enhanced the code * Reutilized args0 * Moved request_timeout parameter to common class * Added comment * Removed static time * removed warning message * resolved pylint error * resolved the comments Co-authored-by: namrata270998 <[email protected]>
Description of change
Manual QA steps
Risks
Rollback steps