* for availability check - handle HttError happens during slice extraction (reading of parent stream),
updated reason messages,
moved check availability call under common try/except which handles errors during usual stream read,
moved log messages which indicate start of the stream sync before availability check in to make to understand which stream is the source of errors
* why do we return here and not try next stream?
* fixed bug in CheckStream, now we try to check availability for all streams
* Move condition for yielding the slice message to an overwritable method
* Automated Commit - Formatting Changes
* yield the slice log messages
* same for incremental
* refactor
* Revert "refactor"
This reverts commit c594365bd8.
* move flag from factory to source
* set the flag
* remove debug print
* halfmock
* clean up
* Add a test for a single page
* Add another test
* Pass the flag
* rename
---------
Co-authored-by: girarda <girarda@users.noreply.github.com>
* [ISSUE #20771] limiting the number of requests performed to the backend without flag
* [ISSUE #20771] code reviewing my own code
* [ISSUE #20771] adding ABC to paginator
* [ISSUE #20771] format code
* [ISSUE #20771] adding slices to connector builder read request (#21605)
* [ISSUE #20771] adding slices to connector builder read request
* [ISSUE #20771] formatting
* [ISSUE #20771] set flag when limit requests reached (#21619)
* [ISSUE #20771] set flag when limit requests reached
* [ISSUE #20771] assert proper value on test read objects __init__
* [ISSUE #20771] code review and fix edge case
* [ISSUE #20771] fix flake8 error
* [ISSUE #20771] code review
* 🤖 Bump minor version of Airbyte CDK
* to run the CI
* Restore AvailabilityStrategy
* Add test for http availability strategy on empty stream from original bug fix 7c17351631
* fix flake errors
* Change CheckStream to use availability strategy
* Refactor test from bug fix
* fix flake errors
* Remove extra helper file from cherry-pick
* Merge tests for default http availability strategy
* turn off HttpAvailabilityStrategy as default (for now) (#21488)
* turn off HttpAvailabilityStrategy as default (for now)
* Update imports accordingly
* Rough first implememtation of AvailabilityStrategy s
* Basic unit tests for AvailabilityStrategy and ScopedAvailabilityStrategy
* Make availability_strategy a property, separate out tests
* Remove from DeclarativeSource, remove Source parameter from methods, make default no AvailabilityStrategy
* Add skip stream if not available to read()
* Changes to CDK to get source-github working using AvailabilityStrategy, flakecheck
* reorganize cdk class, add HTTPAvailabilityStrategy test
* cleanup, docstrings
* pull out error handling into separate method
* Pass source and logger to check_connection method
* Add documentation links, handle 403 specifically
* Fix circular import
* Add AvailabilityStrategy to Stream and HTTPStream classes
* Remove AS from abstract_source, add to Stream, HTTPStream, AvailabilityStrategy unit tests passing for per-stream strategies
* Modify MockHttpStream to set no AvailabilityStrategy since source test mocking doesn't support this
* Move AvailabilityStrategy class to sources.streams
* Move HTTPAvailabilityStrategy to http module
* Use pascal case for HttpAvailabilityStrategy
* Remove docs message method :( and default to True availability on unhandled HTTPErrors
* add check_availability method to stream class
* Add optional source parameter
* Add test for connector-specific documentation, small tests refactor
* Add test that performs the read() function for stream with default availability strategy
* Add test for read function behavior when stream is unavailable
* Add 403 info in logger message
* Don't return error for other HTTPErrors
* Split up error handling into methods 'unavailable_error_codes' and 'get_reason_for_error'
* rework overrideable list of status codes to be a dict with reasons, to enforce that users provide reasons for all listed errors
* Fix incorrect typing
* Move HttpAvailability to its own module, fix flake errors
* Fix ScopedAvailabilityStrategy, docstrings and types for streams/availability_strategy.py
* Docstrings and types for core.py and http/availability_strategy.py
* Move _get_stream_slices to a StreamHelper class
* Docstrings + types for stream_helpers.py, cleanup test_availability.py
* Clean up test_source.py
* Move logic of getting the initial record from a stream to StreamHelper class
* Add changelog and bump minor version
* change 'is True' and 'is False' behavior
* use mocker.MagicMock
* Remove ScopedAvailabilityStrategy
* Don't except non-403 errors, check_stream uses availability_strategy if possible
* CDK: pass error to reasons_for_error_codes
* make get_stream_slice public
* Add tests for raising unhandled errors and retries are handled
* Add tests for CheckStream via AvailabilityStrategy
* Add documentation for stream availability of http streams
* Move availability unit tests to correct modules, report error message if possible
* Add test for reporting specific error if available
* better comment to show sync types
* WIP - basics in place
* test cleanup
* emit `AirbyteEstimateTraceMessage`
* assert estimates emitted
* unit tests passing
* format
* flake
* check tests
* add newline
* lint
* check in with new file name
* bump acceptance test yml
* acceptance test progress
* deterministic purchases
* SAT making progress
* better disable
* adjust yaml
* change abnormal_state.json format
* per-stream state
* products for abnormal state
* products have state + incremental
* purchases state = total_user_records
* update docs and name
* disable proper version
* typo
* try disable 0.2.1
* kwargs
* v1.0.0
* lint
* backward_compatibility_tests_config
* auto-bump connector version
Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
* method yielding airbytemessage
* move to Stream
* update abstract source
* reset
* missing file
* Yield request and response as log messages
* only emit request and responses if the debug flag is on
* add test docker image
* script to run acceptance tests with local cdk
* Update conftest to use a different image
* extract to method
* dont use a different image tag
* Always install local cdk
* break the cdk
* get path from current working directory
* or
* ignore unit test
* debug log
* Revert "AMI change: ami-0f23be2f917510c26 -> ami-005924fb76f7477ce (#18689)"
This reverts commit bf06decf73.
* build from the top
* Update source-acceptance-test
* fix
* copy setup
* some work on the gradle plugin
* reset to master
* delete unused file
* delete unused file
* reset to master
* optional argument
* delete dead code
* use latest cdk with sendgrid
* fix sendgrid dockerfile
* break the cdk
* use local file
* Revert "break the cdk"
This reverts commit 600c195541.
* dont raise an exception
* reset to master
* unit tests
* missing test
* more unit tests
* remove deprecated comment
* newline
* reset to master
* remove files
* reset
* Update abstract source
* remove method from stream
* convert to airbytemessage
* unittests
* Update
* unit test
* remove debug logs
* Revert "remove debug logs"
This reverts commit a1a139ef37.
* Revert "Revert "remove debug logs""
This reverts commit b1d62cdb60.
* Revert "reset to master"
This reverts commit 3fa6a004c1.
* fix
* slightly better test
* typing
* extract method
* Revert "Revert "reset to master""
This reverts commit 5dac7c2804.
* reset to master
* reset to master
* Revert "reset to master"
This reverts commit 3fa6a004c1.
* Comment
* operate on the message
* Revert "Revert "reset to master""
This reverts commit 5833c84d0a.
* comment
* test
* Revert "test"
This reverts commit 2f91b803b0.
* test
* Revert "test"
This reverts commit 62d95ebbb5.
* test
* Revert "test"
This reverts commit 27150ba341.
* format
* format
* symlink
* Update setup
* update path
* reset to master
* update
* Add local files
* greenhouse
* format
* symlink
* try reordering
* better error message
* better log message
* reset to master
* Revert "merge for qa"
This reverts commit ad7128f2c5, reversing
changes made to 7196c22a73.
* reset to master
* reset to master
* reset to master
* format
* gradlew format
* right type hints
* reset to master
* reset to master
* gradlew format
* a bunch of small fixes
* Update output format
* fixes from feedback
* fixme comment
* streams cannot return AirbyteRecordMessage
* fix
* format
* only return logs when running on debug mode
* move branching
* update typing
* remove dead code
* fix simpleretriever name
* i think this is better
* log response.text
* debug flag
* comment
* pass config
* comments
* run SATs
* fix most of the unit tests
* fix unit test
* reset to master
* runFromPath
* Revert "runFromPath"
This reverts commit 85979a801a.
* Revert "run SATs"
This reverts commit a8a8a2da95.
* no need to convert to dict
* fix test
* method yielding airbytemessage
* move to Stream
* update abstract source
* reset
* missing file
* add test docker image
* script to run acceptance tests with local cdk
* Update conftest to use a different image
* extract to method
* dont use a different image tag
* Always install local cdk
* break the cdk
* get path from current working directory
* or
* ignore unit test
* debug log
* Revert "AMI change: ami-0f23be2f917510c26 -> ami-005924fb76f7477ce (#18689)"
This reverts commit bf06decf73.
* build from the top
* Update source-acceptance-test
* fix
* copy setup
* some work on the gradle plugin
* reset to master
* delete unused file
* delete unused file
* reset to master
* optional argument
* delete dead code
* use latest cdk with sendgrid
* fix sendgrid dockerfile
* break the cdk
* use local file
* Revert "break the cdk"
This reverts commit 600c195541.
* dont raise an exception
* reset to master
* unit tests
* missing test
* more unit tests
* newline
* reset to master
* remove files
* reset
* Update abstract source
* remove method from stream
* convert to airbytemessage
* unittests
* Update
* unit test
* remove debug logs
* Revert "remove debug logs"
This reverts commit a1a139ef37.
* Revert "Revert "remove debug logs""
This reverts commit b1d62cdb60.
* Revert "reset to master"
This reverts commit 3fa6a004c1.
* Revert "Revert "reset to master""
This reverts commit 5dac7c2804.
* reset to master
* reset to master
* test
* Revert "test"
This reverts commit 2f91b803b0.
* test
* Revert "test"
This reverts commit 62d95ebbb5.
* test
* Revert "test"
This reverts commit 27150ba341.
* format
* update abstract source and connector state manager to update shared and stream state
* clean up some extra comments and extra lines
* a few changes based on PR feedback
* remove separate legacy map from state manager and simplify mapping to descriptor -> state blob
* rename a few paramets and add testing for state update via stream.state override
* replace shared_state processing with an explicit error and fix a few comments and pr feedback
* add some polish and additional test cases
* Add create_state_message to manager and emit per-stream state for connectors
* pr feedback and restructuring parts of the connector state manager initialization
* fix unfinished comment
* Update airbyte-cdk/python/unit_tests/sources/test_abstract_source.py
Co-authored-by: Augustin <augustin.lafanechere@gmail.com>
* use pytest params to annotate tests better
* change to fix changed class name
* format test params a little better
* Update airbyte-cdk/python/airbyte_cdk/sources/connector_state_manager.py
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
* a few bits of pr feedback
* do not emit namespace in the outbound message if it is None
* fix some issues w/ prior merge from master and pr feedback
* add new tests to ensure we never send None namespace to the platform
* bump CDK version number
Co-authored-by: Augustin <augustin.lafanechere@gmail.com>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
* update abstract source and connector state manager to update shared and stream state
* clean up some extra comments and extra lines
* a few changes based on PR feedback
* remove separate legacy map from state manager and simplify mapping to descriptor -> state blob
* rename a few paramets and add testing for state update via stream.state override
* replace shared_state processing with an explicit error and fix a few comments and pr feedback
* add some polish and additional test cases
* pr feedback and restructuring parts of the connector state manager initialization
* fix unfinished comment
* Update airbyte-cdk/python/unit_tests/sources/test_abstract_source.py
Co-authored-by: Augustin <augustin.lafanechere@gmail.com>
* use pytest params to annotate tests better
* change to fix changed class name
* Update airbyte-cdk/python/airbyte_cdk/sources/connector_state_manager.py
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
* a few bits of pr feedback
* pr feedback and cleaning up some comments and variable renames
Co-authored-by: Augustin <augustin.lafanechere@gmail.com>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
* interpret legacy and new per-stream format into AirbyteStateMessages
* add ConnectorStateManager stubs for future work
* remove frozen for the time being until we need to hash descriptors
* add validation that AirbyteStateMessage has at least one of stream, global, or data fields
* pr feedback and clean up of the code
* remove changes to airbyte_protocol and perform validation in read_state()
* fix import formatting
* Emit a state message even if no records were read
* newline
* merge
* comment
* implement logic in the abstract source
* remove logic from declarative source
* comment
* bump cdk version
* allow for command line debug option and basic debug statements + declarative
* feedback from pr comments
* fix some tests w/ req/res mixed up and fixing logging tests
* formatting
* pr feedback: cleaning up traces in logger.py and update docs with debug configuration
* remove unneeded trace logger test
* remove extra print statement
* add support for streams with state attribute
* fix pre-commit and format
* update state attribute docs and logic
* added IncrementalMixin
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
* fix typing, drop AirbyteLogger
* format
* bump the version
* use logger instead of fixture logger
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
Co-authored-by: auganbay <auganenu@gmail.com>
* add base spec model
* fix usage of state_checkpoint_interval in case it is dynamic
* add schema base models, fix spelling, signatures and polishing
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
* CDK: fix number of records mismatch
Increment `record_counter` after we check whether we reached the limit or not.
* Update docs. Bump version to 0.1.17