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

TDL-590: Added retry logic on JSON decoder error in the filter function #83

Merged
merged 2 commits into from Apr 5, 2021

Conversation

karanpanchal-crest
Copy link
Contributor

Description of change

TDL-590: Add retry logic to client "filter" function so it can be retried on error

Manual QA steps

  • Wasn't able to reproduce in the LIVE env. However, added an invalid JSON in the function and made sure that the function retries 3 times before halting the execution

Risks

  • No Risks

Rollback steps

  • revert this branch

Automated tests

  • Added a unit test for a negative scenario and a positive scenario

config = {}
tap_stream_id = "contacts"

global json_decode_error_str
Copy link
Contributor

@KAllan357 KAllan357 Apr 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the global and just define two separate mocked_request functions - one for the failing case (ex: mocked_failed_request (with the bad JSON) and the second for the passing case (ex: mocked_successful_request)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KAllan357 Incorporated the change as suggested.
Thank you

@KAllan357
Copy link
Contributor

I requested a change but this looks good other than that.

@KAllan357 KAllan357 merged commit c14ce9d into master Apr 5, 2021
@KAllan357 KAllan357 deleted the TDL-590-retry-on-json-decode-error branch April 5, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants