1
0
mirror of synced 2025-12-25 11:06:55 -05:00
Commit Graph

31 Commits

Author SHA1 Message Date
Ella Rohm-Ensing
55a32886a3 CDK: AbstractSource.read() skips syncing stream if its unavailable (add AvailabilityStrategy concept) (#19977)
* 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
2022-12-12 14:32:34 -05:00
Tanvesh Takawale
da5aed8a31 CDK: fixed document links regarding airbyte specification (#18169) 2022-10-19 09:50:01 -07:00
Augustin
4df0a48427 cdk and docs: remove "additionalProperties" (#14881) 2022-07-22 15:34:27 +02:00
Charles
22b727c0ea Update Airbyte Protocol Docs (#13709) 2022-06-14 15:04:38 -07:00
Sherif A. Nada
49810f8c13 sweep airbyte-integrations/bases/airbyte-protocol (#12598) 2022-05-05 13:51:16 -07:00
Sherif A. Nada
cc46255190 cull base-python and base-python-test (#12596) 2022-05-05 13:48:15 -07:00
Brian Lai
ceec454e30 update python cdk tutorial with updates to exchange rates api (#12427)
* update python cdk tutorial with updates to exchange rates api

* remove extra comment in source.py tutorial sample code
2022-04-29 13:44:04 -07:00
Brian Leonard
c302af45ff Upgrade to Python 3.9 (#11763)
* Dockerfile to 3.9

* Python version

* More python updates

* 3.9 on GitHub actions and lint updates

* Test out 3.9.11 on GitHub actions

* install python with an action

* formatting: newline

* Also has python code

* only check first level for changed modules
Previous example (source-google-search-console/credentials)

* Test failure: there is no logger.trace
2022-04-11 20:51:37 -07:00
Eugene Kulak
d173ce741f CDK: add support for streams with state attribute (#9746)
* 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>
2022-02-17 00:20:33 +04:00
Jared Rhizor
1affb14827 even more link fixes (#7148)
* even more link fixes

* add remaining exchangerates items
2021-10-20 12:56:55 -07:00
LiRen Tu
e3be3d2ad0 Update M1 doc and fix doc links (#7205)
* Add note about jdk 14 vs 17 for m1

* Fix doc links
2021-10-19 22:31:16 -07:00
Arthur Galuza
9aa5a5a52d 🎉 CDK: Added support for efficient parent/child streams using cache (#6057)
* Add caching

* Upd cache file handling

* Upd slices, sync mode, docs

* Bump version

* Use SyncMode.full_refresh for parent stream_slices

* Refactor
2021-09-22 20:23:27 +03:00
Abhi Vaidyanatha
e7413de0dc Add a variant of the CDK speedrun that uses the PokeAPI (#5780)
* Add a variant of the CDK speedrun that uses the PokeAPI

* Make a lot of clarifications to improve the learning experience.

* Gradle format

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-09-08 14:56:13 -07:00
Dmytro
7584440515 CDK: private configuration option _limit and _page_size (#5617)
* CDK: private configuration option _limit and _page_size
2021-08-31 12:16:48 +03:00
Yaroslav Dudar
8ddce6f355 🎉 Python CDK: Allow to ignore http status errors and override retry parameters (#5363)
added auto_fail_on_errors, max_retries, retry_factor properties to python cdk
2021-08-25 10:31:24 +03:00
LiRen Tu
2906ec287a CI: Add action to check broken doc links (#5254)
* Add action to check broken doc links

* Ignore localhost

* Update config

* Fix broken links

* Use quiet mode

* Ignore PR link

* Fix more broken links

* Fix more broken links

* Fix more broken links

* Verify pattern

* Fix more broken links

* Separate full and pr check

* Update pattern

* Test invalid link

* Remove invalid link
2021-08-07 14:28:02 -07:00
Sherif A. Nada
9d8b1731b0 Remove outdated note about CDK not supporting destinations (#4995) 2021-07-26 13:52:42 -07:00
Sherif A. Nada
3aebe55cd5 🎉 Python CDK: Allow setting network adapter args on outgoing HTTP requests (#4493) 2021-07-07 15:17:58 -07:00
Sherif A. Nada
21116cad97 📚 add doc to describe how CDK handles schemas (#4537) 2021-07-06 15:58:27 -07:00
Dmytro
d5d0c8b252 Replace npm install + generate -> ./generate.sh in docs (#4048) 2021-06-11 02:17:35 +03:00
Sherif A. Nada
30c1e95d9e Add migration guide from legacy CDK to current CDK (#3860) 2021-06-03 22:40:01 -07:00
Yaroslav Dudar
c49ff40754 🎉 Python CDK: change minimum python version to 3.7.0 (#3692)
* changed python version to 3.7.0 in cdk

* updated Python version in Github Actions
2021-05-28 21:08:53 +03:00
Sherif A. Nada
137845a28e rename toy connector tutorial to "Build a connector the hard way" (#3421) 2021-05-17 13:31:25 -07:00
Abhi Vaidyanatha
576d932ddb Add a CDK speedrun tutorial doc (#3403)
* Add CDK Speedrun document.

* Finish speedrun doc.

* Address review comments

* Add to SUMMARY.md

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-05-14 16:43:34 -07:00
Davin Chia
9a92da06b9 Update CDK Tutorial to use new CDK. (#3358)
As the title suggests.

Some intricacies around how various directories have diverged.

The HTTP templates now use integration_tests to house catalogs and config files instead of sample_files. After this PR, everything should be updated to use integration_tests for all files except config files. Config files use secrets since they often contain secrets. Anything, besides actual implementations that have yet to be updated, not following this is my mistake.

Even though it diverges from the generated templates, I've decided to leave the tutorial code and the tutorial as using sample_files for now. I think it's more straightforward than telling people to create a new secrets directory. We can change this at a later date.

Confirmed the checked in http python tutorial code works by running ./gradlew :airbyte-integrations:connectors:source-python-http-tutorial:standardSourceTestFile.
2021-05-11 16:52:13 +08:00
Davin Chia
94f6d17796 CDK: Update conceptual docs. Update template docs. (#3352) 2021-05-11 11:02:51 +08:00
Abhi Vaidyanatha
4a397d2524 Rewrite and break out CDK Python overview to be more concise and digestible (#3291)
Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-05-07 20:30:21 -07:00
Abhi Vaidyanatha
05bdb368a0 Reorganize CDK documentation directory structure to be less nested (#3270)
* Move CDK docs down a level, consolidate directories.

* Change name of tutorial

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-05-07 12:50:33 -07:00
Abhi Vaidyanatha
e2d5bfa3ea Add primary_key noop to docs and PokeAPI connector. (#3245)
* Add primary_key noop to docs and PokeAPI connector.

* Small grammar fix in FAQ.

* Change empty string to None for noop.

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-05-06 10:54:42 -07:00
Abhi Vaidyanatha
4710e5836f Adding concepts docs, structure for CDK documentation (#3220)
* Adding concepts docs, structure for CDK documentation

* Add more context to the CDK README

Co-authored-by: Abhi Vaidyanatha <abhivaidyanatha@Abhis-MacBook-Pro.local>
2021-05-04 17:09:29 -07:00
Sherif A. Nada
e9287e7964 Naively merge all Python modules into one. (#3148)
* naively merge all python base modules into one

* Formatting changes.

Co-authored-by: Davin Chia <davinchia@gmail.com>
2021-04-30 15:17:55 +08:00