-
Notifications
You must be signed in to change notification settings - Fork 23
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-22683] Use Date Windowing Pagination #113
Merged
Merged
Changes from 68 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
d51282c
Adding None support to HashableDict
cosimon 7801007
Initial date windowing logic for activities stream.
shantanu73 e3851a8
Changes:
shantanu73 16d3fcb
Changes:
shantanu73 859d923
Changing number of threads from 20 to 1 to fix memory issue.
shantanu73 db922e5
Changes:
shantanu73 01d315d
Changes:
shantanu73 28fbc3a
Fixed issue with initializing offset and infinite loop in date window…
shantanu73 e33022b
Remove performance metrics
cosimon 887e0b3
Remove performance metrics
cosimon 1b399dc
Initializing final_buffer variable.
shantanu73 da24d92
Fixed BEFORE date for loan_transactions & gl_journal_entries streams.
shantanu73 a8d46dd
Fixed BEFORE date for loan_transactions & gl_journal_entries streams.…
shantanu73 6d6ae66
Limit max buffer size
162e542
Add generator change
b5c3941
Changing default date window, from 3 to 5.
shantanu73 58a98b8
Added generic date windowing for all MultiThreadedOffsetGenerator str…
shantanu73 3403ea7
Implemented modify_request_params method for Activities stream.
shantanu73 aedd6aa
Implemented modify_request_params method for Installments stream.
shantanu73 a9ff3ad
Disabled Date windowing for Users stream.
shantanu73 db07f7a
Removed endpoint filter criteria for Clients stream.
shantanu73 554720b
Implemented modify_request_params method for Communications stream.
shantanu73 7711832
Removed endpoint filter criteria for DepositAccounts stream.
shantanu73 11e44de
Removed endpoint filter criteria for DepositTransactions stream.
shantanu73 09473ff
Removed modify_request_params implementation from GL Journal Accounts…
shantanu73 232a7ea
Removed endpoint filter criteria for Groups stream.
shantanu73 70fc616
Removed endpoint filter criteria for Interest Accrual Breakdown stream.
shantanu73 7856961
Removed modify_request_params implementation from Loan Transactions s…
shantanu73 b4cf6d5
Changes:
shantanu73 69f2435
Fixed bug in communications stream date windowing implementation.
shantanu73 2be5cf7
Set date_windowing as False and restored original implementation for …
shantanu73 fac0fa0
Merge branch 'master' into TDL-22683-date-windowing-pagination
shantanu73 33bfbd1
Changed loan_accounts stream implementation to MultithreadedBookmarkG…
shantanu73 0d57fb7
Added backoff for intermittent ProtocolError in Mambu APIs.
shantanu73 08bc5f7
- Raise exception when thread is dead
shantanu73 1c9aed4
Adding frequent bookmarks in case of multi-threaded parent streams.
shantanu73 fdd1019
Changes:
shantanu73 e8789a4
Fix memory limit for loan_repayments
527617b
Merge branch 'TDL-22683-date-windowing-pagination' of github.com:sing…
f559a63
Fix memory issue for child generators
ec82db9
Reduce max buffer limit of parent stream
9857841
Reducing max threads for Loan accounts generator.
1b8973d
Changes:
shantanu73 b8584a7
Merge branch 'TDL-22683-date-windowing-pagination' of github.com:sing…
shantanu73 6cd984a
Changed BEFORE value of modify_request_params to have 1 min overlap i…
shantanu73 ec3bc76
Add backoff for ChunkedEncodingError
RushiT0122 1dbdd6b
Update loan_accounts bookmarking strategy
RushiT0122 56eca6c
Interrupted sync enhancements
RushiT0122 8684a68
Minor fix
RushiT0122 f7175ef
- Update bookmarking to fix missing child records
RushiT0122 b1e9138
Minor fixes
RushiT0122 0efeb77
Remove wait for thread implementation
RushiT0122 ba83d27
- Empty buffer before next date window
RushiT0122 179ad28
Remove frequent bookmarking
RushiT0122 0aabdaf
Reduce integration test execution time
RushiT0122 77aa759
Fix integration tests
8cb2a43
Merge cobnflicts
5b691a9
Parallelise integration tests
cd3ae43
fix config.yml
a680071
fix config.yml
8eae933
Read window_ize from config
fa9d9e3
Minor window size fixes
c37fedf
- Fix bookmarking for FULL_TABLE multi-threaded streams
f101dff
- Add 30 days window size to reduce integration test execution time
993883a
Update window_size implementation
8a25625
Add window_size unittests
4fe5582
Update README file
9483813
Install parameterized madule for unittests
f82eac5
Fix review comments
da2f222
Bump version 4.2.0
shantanu73 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
version: 2.1 | ||
orbs: | ||
slack: circleci/[email protected] | ||
|
||
executors: | ||
docker-executor: | ||
docker: | ||
- image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:stitch-tap-tester | ||
|
||
jobs: | ||
build: | ||
executor: docker-executor | ||
steps: | ||
- run: echo "CI Done" | ||
|
||
ensure_env: | ||
executor: docker-executor | ||
steps: | ||
- checkout | ||
- run: | ||
|
@@ -12,39 +24,93 @@ jobs: | |
source /usr/local/share/virtualenvs/tap-mambu/bin/activate | ||
pip install -U 'pip<19.2' 'setuptools<51.0.0' | ||
pip install .[dev] | ||
- add_ssh_keys | ||
- run: | ||
name: 'JSON Validator' | ||
command: | | ||
source /usr/local/share/virtualenvs/tap-tester/bin/activate | ||
stitch-validate-json tap_mambu/helpers/schemas/*.json | ||
aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/tap_tester_sandbox /usr/local/share/virtualenvs/dev_env.sh | ||
- slack/notify-on-failure: | ||
only_for_branches: master | ||
- persist_to_workspace: | ||
root: /usr/local/share/virtualenvs | ||
paths: | ||
- tap-mambu | ||
- dev_env.sh | ||
|
||
run_unit_tests: | ||
executor: docker-executor | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: /usr/local/share/virtualenvs | ||
- run: | ||
when: always | ||
name: 'Unit Tests' | ||
command: | | ||
source /usr/local/share/virtualenvs/tap-mambu/bin/activate | ||
pip install parameterized | ||
pytest tests/unittests | ||
- store_test_results: | ||
path: test_output/report.xml | ||
- store_artifacts: | ||
path: htmlcov | ||
|
||
run_integration_tests: | ||
executor: docker-executor | ||
parallelism: 5 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: /usr/local/share/virtualenvs | ||
- run: | ||
name: 'Integration Tests' | ||
name: 'Run Integration Tests' | ||
no_output_timeout: 30m | ||
command: | | ||
aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/tap_tester_sandbox dev_env.sh | ||
source dev_env.sh | ||
source /usr/local/share/virtualenvs/dev_env.sh | ||
mkdir /tmp/${CIRCLE_PROJECT_REPONAME} | ||
export STITCH_CONFIG_DIR=/tmp/${CIRCLE_PROJECT_REPONAME} | ||
source /usr/local/share/virtualenvs/tap-tester/bin/activate | ||
run-test --tap=tap-mambu tests | ||
circleci tests glob "tests/test_*.py" | circleci tests split > ./tests-to-run | ||
if [ -s ./tests-to-run ]; then | ||
for test_file in $(cat ./tests-to-run) | ||
do | ||
echo $test_file > $STITCH_CONFIG_DIR/tap_test.txt | ||
run-test --tap=${CIRCLE_PROJECT_REPONAME} $test_file | ||
done | ||
fi | ||
- slack/notify-on-failure: | ||
only_for_branches: master | ||
- store_artifacts: | ||
path: /tmp/tap-mambu | ||
|
||
workflows: | ||
version: 2 | ||
commit: | ||
commit: &commit_jobs | ||
jobs: | ||
- ensure_env: | ||
context: | ||
- circleci-user | ||
- tier-1-tap-user | ||
- run_unit_tests: | ||
context: | ||
- circleci-user | ||
- tier-1-tap-user | ||
requires: | ||
- ensure_env | ||
- run_integration_tests: | ||
context: | ||
- circleci-user | ||
- tier-1-tap-user | ||
requires: | ||
- ensure_env | ||
- build: | ||
context: circleci-user | ||
context: | ||
- circleci-user | ||
- tier-1-tap-user | ||
requires: | ||
- run_unit_tests | ||
- run_integration_tests | ||
build_daily: | ||
<<: *commit_jobs | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
cron: "0 1 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- build: | ||
context: circleci-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DEFAULT_PAGE_SIZE = 200 | ||
DEFAULT_DATE_WINDOW_SIZE = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can't we do integer typecasting directly instead of, converting to float first?
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.