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

157 Commits

Author SHA1 Message Date
Baz
4e9b014277 🐛 Python CDK: fix StopIteration error for check_availability (#20429) 2022-12-13 17:54:49 +02:00
Catherine Noll
9dae0986f9 Enable low-code CDK users to specify schema in the manifest (#20375)
Enable low-code CDK users to specify schema in the manifest

Also update documentation:
* Add inline schema loader info to yaml-overview.md
* Include inline schema info in tutorial
2022-12-12 23:44:11 -05:00
darynaishchenko
2f306ea1d0 Low-Code: added SessionTokenAuthenticator (#19716)
* added SessionTokenAuthenticator for low-code

* added doc comments and formatted files

* fixed doc strings

* added login_url and validate_session_url to config

* removed unused f-string, formatted

* Update log

Co-authored-by: Serhii Lazebnyi <serhii.lazebnyi@globallogic.com>
2022-12-12 21:45:18 +01:00
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
Maxime Carbonneau-Leclerc
50f22cd5d7 [ISSUE #15628] apply lookback window on earliest datetime between sta… (#20156)
* [ISSUE #15628] apply lookback window on earliest datetime between start and cursor

* [ISSUE #15628] update release information and clean return statement
2022-12-08 09:20:58 -05:00
Serhii Chvaliuk
3bab0dab71 CDK: offset_increment.page_size make as [int, InterpolatedString] (#20190)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-12-08 00:28:05 +02:00
Maxime Carbonneau-Leclerc
2568d6107c Issue 19733 cdk clarify config error message for config files (#20019)
* [ISSUE-19733] clarify error message when reading config files

* [ISSUE #19733] code review and adding validation for spec file as well

* [ISSUE #19733] updating typing of read_json_file

* [ISSUE #19733] fix flake8 error

* [ISSUE #19733] fix linting error

* [ISSUE #19733] remove breaking change

* [ISSUE #19733] bump airbyte cdk version

* [ISSUE #19733] add test for invalid json file on read_state

* [ISSUE #19733] bump version
2022-12-06 18:55:00 -05:00
Roman Yermilov [GL]
23b35ba27c airbyte-cdk: bump version (#20143) 2022-12-06 20:47:16 +04:00
Roman Yermilov [GL]
bedc3b99a3 airbyte-cdk offset pagination strategy: page_size to be interpolated … (#19646)
* airbyte-cdk offset pagination strategy: page_size to be interpolated string
* airbyte-cdk offset pagination strategy: bump version
2022-12-06 18:48:56 +04:00
Alexandre Girard
4dcc68ade9 SimpleRetriever raises exception with error message extracted from the response (#20032)
* Raise exception with error message

* read from detail field if no other value was found

* format

* dont test the error message

* format

* error code

* bump
2022-12-02 17:56:23 -08:00
Catherine Noll
44a1440d49 Include http method in SimpleRetriever log message for requests (#19964)
* Add http method to `SimpleRetriever` log message on request

* Update setup.py (bump version to 0.11.2)

* Update CHANGELOG.md
2022-12-01 15:52:20 -05:00
Brian Lai
b1c50b8470 Fix the underlying component schema to use check instead of checker (#19910)
* fix underlying schema to use check instead of checker

* regenerate the component manifest

* regen manifest

* bump patch version
2022-11-30 20:42:48 -05:00
Augustin
3b15f9ebe1 CDK: Emit control message on config mutation (#19428) 2022-11-29 14:51:01 +01:00
Denys Davydov
fc52644bac CDK Lowcode: allow parametrizing initial page when using PageIncrement (#19712)
* #CDK Lowcode: allow parametrizing initial page when using PageIncrement

* bump minor version
2022-11-28 18:26:08 +02:00
Serhii Chvaliuk
dc2c61837b CDK: Add jinja macro format_datetime (#19506)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-11-18 19:18:32 +02:00
Brian Lai
e97ece5532 [low-code cdk] break resolving reference preprocessing into its own class so it can be reused (#19517)
* break resolving reference preprocessing into its own class so it can be reused

* move reference resolution into the ManifestDeclarativeSource and deprecate the parser

* formatting

* last formatting i promise

* rename

* bump version

Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2022-11-17 13:15:28 -08:00
Serhii Chvaliuk
22d226aabe CDK: Avoid duplicate HTTP query in simple_retriever (#19485)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-11-16 18:55:29 +02:00
Serhii Chvaliuk
d5b66e9d7b CDK: make default_paginator.page_token_option optional (#19368)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-11-14 20:16:30 +02:00
Serhii Chvaliuk
5cd88e7c05 CDK: don't filter failed interpolated vars for request_options_provider.request_body_json (#19297)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-11-11 10:44:23 +02:00
Brian Lai
60c008f6cd don't update cursor for log messages and and default schema path coming from connector builder (#19271)
* don't update cursor for log messages and and default schema path coming from connector builder

* replace check for connector_builder module with a basic default file path

* update changelog and patch version

* catch the correct exception when pkgutil can't load json file
2022-11-10 19:23:05 -05:00
Brian Lai
f54f4af43f bump cdk version (#19255) 2022-11-09 17:53:29 -05:00
Brian Lai
5c9e5d9934 [low-code cdk] decouple parsing the yaml manifest from the declarative source implementation (#19095)
* decouple parsing the yaml manifest from the declarative source implementation

* bump version and changelog
2022-11-08 15:45:01 -05:00
Brian Lai
f9863d6374 [low-code cdk] Allow for spec file to be defined in the yaml manifest instead of an external file (#18411)
* allow for spec to be defined in the source.yaml manifest instead of an external file

* make spec a component within the language to get schema validation and rework the code for better testing

* fix formatting and extra method

* pr feedback and add some more test

* pr feedback

* bump airbyte-cdk version

* bump version

* gradle format

* remove  from manifest spec
2022-11-07 14:44:45 -05:00
Alexandre Girard
3ff3e9aeee Bump CDK version (#19033)
* bump

* bump to 0.6.0
2022-11-07 09:27:09 -08:00
Xabier Lahuerta Vazquez
aa5da75d81 Add support for monthly and yearly incremental updates (#18861)
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2022-11-07 07:49:57 -08:00
Denys Davydov
8145be55a3 Low-code CDK: safe get response.json (#18931)
* low-code cdk: safe get response.json

* flake fix
2022-11-04 11:44:51 +02:00
Brian Lai
186580a6ee [low-code] replace emptySchemaLoader with DefaultSchemaLoader (#18947)
* replace emptySchemaLoader with DefaultSchemaLoader

* fix test name

* fix test

* add logging for when we default to the empty schema

* increment patch version

* fix formatting

* update changelog
2022-11-03 23:25:01 -04:00
Brian Lai
dd7184dbca [low-code cdk] Allow for read command to be run on low code connector streams w/o a schema file (#18532)
* use mockschemaloader as the default and rename JsonSchema to JsonFileSchemaLoader

* rename mock to EmptySchemaLoader

* retain existing JsonSchema while hacktoberfest is still in progress

* bump version and changelog
2022-11-03 12:05:04 -04:00
Alexandre Girard
cd1f492140 🐛 Lowcode: ListStreamSlicer and SubstreamSlicer should get the stream_slice from the arguments (#18574)
* fix list stream slicer

* get the stream slice from the parameters

* delete unused code

* Add comments

* missing test

* newline

* with pytest.raise

* reset to master

* newline

* Update __init__.py

* Update __init__.py

* 🎉 New Source: ConvertKit (#18455)

* Init source omnisend

* Removed unnecessary files

* Init source convertkit

* Added forms, sequences streams

* Added tags stream

* Added subscribers, broadcasts streams

* Added documentation

* Removed unnecessary files

* Updated pull request information in documentation

* Added sample config

* Updated invalid config

* Formatting, removed abnormal state, uncommented full_refresh acceptance test

* Added pagination for subscribers stream

* fix: add source definition for convertkit

* auto-bump connector version

Co-authored-by: Sajarin <sajarindider@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>

* 🎉New Source: Google Webfonts [low-code cdk] (#18496)

* New source: Google webfonts

* chore: Add Docs

* chore: update changelog

* chore: resolved given comments for PR

* chore: unwanted files removed

* fix: generate and add source definitions

Co-authored-by: sajarin <sajarindider@gmail.com>

* Clean up build.gradle. (#18555)

Upstream has fixed this bug so we no longer need to host it internally. Remove this to clean up build.gradle.

* 🎉 New Destination: Typesense (#18349)

* Initial boilerplate

* 🎉 New Destination: Typesense

* remove .java-version

* fix doc

* add typesense to dest def

* add release stage

* add requirement to main

* auto-bump connector version

* add changelog

Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>

* 🎉 New Source: Waiteraid [low-code cdk] (#18165)

* added source waiteraid

* 🎉 New Source: Waiteraid

* add searchBookings stream

* add P/R number

* add SUMMARY entry

* add docs/integrations/README.md entry

* add builds.md entry

* add docs to each endpoint

* fix schema
~

* Update airbyte-integrations/builds.md

added web address

Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>

* Delete catalog.json

* Delete TODO.md

* Update spec.yaml

* add waiteraid to source def seed

* auto-bump connector version

Co-authored-by: Sebastian Brickel <sebastianbrickel@Sebastians-MacBook-Air.local>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>

* Replace `recipesLink` link with `tutorialsLink` (#18616)

* Protocol Change: `AirbyteControlMessage.ConnectorConfig` (#17907)

* Protocol Change: AirbyteConfigMessage

* update PR link in docs

* Lint

* Update python files

* Update docs/understanding-airbyte/airbyte-protocol.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* Update docs/understanding-airbyte/airbyte-protocol.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* `AirbyteConfigMessage` -> `AirbyteConnectorConfigMessage`

* AirbyteOrchestratorMessage

* Update docs

* `AirbyteControlConnectorConfigMessage`

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* Remove workflow version check (#18613)

* Improved the Oracle cloud deployment guide (#18615)

* Update OCI VM deployment guide

* Update OCI deployment guide

* Update on oci-vm.md

* bump

Co-authored-by: Dainius Salkauskas <dainiuxazz@gmail.com>
Co-authored-by: Sajarin <sajarindider@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Co-authored-by: Balasubramanian T K <btk.codedev@gmail.com>
Co-authored-by: Davin Chia <davinchia@gmail.com>
Co-authored-by: Cirdes <cirdes@linkana.com>
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: sbrickel-nimble <113671803+sbrickel-nimble@users.noreply.github.com>
Co-authored-by: Sebastian Brickel <sebastianbrickel@Sebastians-MacBook-Air.local>
Co-authored-by: Evan Tahler <evan@airbyte.io>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
Co-authored-by: Jonathan Pearlin <jonathan@airbyte.io>
Co-authored-by: Victor Ikechukwu <vickyikechukwu13@gmail.com>
2022-10-28 13:09:19 -07:00
Alexandre Girard
1ddc8c6185 Lowcode connectors: Fix few issues with stream slicers (#18529)
* Fix a few bugs

* bump
2022-10-27 13:33:13 -07:00
Brian Lai
5222093b54 support custom error messaging for error response + retryable errors (#18204)
* support custom error messaging for error response + retryable errors

* remove changed backoff i was using for testing

* refactor filter to construct response status internally

* pr feedback

* bump version and update changelog
2022-10-26 15:39:36 -04:00
Sherif A. Nada
25e7a37de6 Publish new CDK version with typehints exported (#18398) 2022-10-25 09:02:06 -07:00
Nipunn Koorapati
d77f913373 Export python type information for airbyte-cdk (#18387)
Fixes #18384
2022-10-24 12:20:43 -07:00
Alexandre Girard
76acfb8192 [low-code] Propagate options to InterpolatedRequestInputProvider (#18050)
* properly propagate options

* cleanup

* turn into dataclass

* rename

* no need for deepcopy

* fix test

* bump

* cleaner
2022-10-21 10:16:25 -07:00
Pedro S. Lopez
ad29513a43 CDK: Handle config validation errors as config_error and failed check status (#18214)
* schema helpers raises a config_error

* traced exceptions can be turned into connection status messages

* add tests for schema helpers

* return a failed status message rather than throwing in check command

* remove unused imports

* add comment

* bump version / update changelog
2022-10-20 13:23:06 -04:00
Brian Lai
de24ddced5 make sure stream_slices is an iterator (#18092)
* ensure output from stream_slices() is always an iterator

* bump cdk version

* bump version after merging latest cdk

* bump cdk version post rebase
2022-10-19 15:37:00 -04:00
Serhii Chvaliuk
258b23cf79 CDK: VCR -> requests_cache + SQLite (#17990)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2022-10-19 19:31:28 +03:00
Augustin
b564f3eb78 Protocol: make supported_sync_modes a required not empty list on AirbyteStream (#15591) 2022-10-19 15:22:25 +02:00
Alexander Marquardt
26b6317198 Added new "filters" python file, along with a "hash" filter. This can… (#18000)
* Added new "filters" python file, along with a "hash" filter. This can be extended to include other custom filters in the future.

* Added additional comments

* Moved usage of the hash_obj inside the conditional that confirms it exists

* Moved the hash function call inside a condition to ensure that it exists

* Fixed the application of the salt , so that it does not modify the hash unless it is actually passed in.

* Added unit tests to validate new jinja hash functionality

* Updated unit test to pass numeric value as a float instead of string

* Removed unreferenced import to pytest

* Updated version

* format

* format

* format

* format

* format

Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2022-10-17 23:19:55 -07:00
Brian Lai
4714a1c004 fix check for streams that do not use a stream slicer (#18080)
* fix check for streams that do not use a stream slicer

* increment version and changelog before publish
2022-10-17 17:11:11 -04:00
Alexandre Girard
0ffd503b21 🐛 [low-code] $options shouldn't overwrite values that are already defined (#18060)
* fix

* Add missing test

* remove prints

* extract to method

* rename

* Add missing test

* rename

* bump
2022-10-17 11:07:04 -07:00
Alexandre Girard
df72bbdf2c Low-code: Pass stream_slice to read_records when reading from CheckStream (#17804)
* Implement a test

* Implement fix

* rename

* extract method

* bump
2022-10-17 05:47:56 -07:00
Alexandre Girard
62500af93b get module name from sys.modules (#17779)
* get module name from sys.modules

* bump

* fix comment

* throw exception

* fix unittests

* Add missing files

* remove debug prints

* indent
2022-10-10 13:54:09 -07:00
Alexandre Girard
89a9d6497a Add missing types to the registry (#17763)
* Add missing types to the registry

* bump
2022-10-09 01:25:38 -07:00
Alexandre Girard
18da341b91 Revert: #17047 Airbyte CDK: Improve error for returning non-iterable from connectors parse_response (#17707)
* Bump cdk version

* Revert "#17047 Airbyte CDK: Improve error for returning non-iterable from connectors parse_response (#17626)"

This reverts commit d9ad2725b1.

* Bump
2022-10-06 18:43:01 -07:00
Alexandre Girard
20ae75e4ee 🐛 : Add missing component types to the types registry (#17700)
* Add page increment to type registry

* Add page increment to type registry
2022-10-06 15:01:58 -07:00
Alexandre Girard
65be9b74f0 Simplify low-code connectors template (#17476)
* default schema loader

* Update generator

* update example

* remove more cruft

* Update code sampels in section 3 (but not the text)

* Update code sampels in 5

* Update instructions

* Update code samples

* Update samples

* Use now_utc instead of local

* isolate complexity to JsonSchema

* Bump cdk version

* Update changelog

* fix unit test

* slightly more helpful default

* Don't freeze cdk version in template

* remove newline

* newline

* bump

* Update changelog

* Bump
2022-10-06 08:12:21 -07:00
Alexandre Girard
3bdd7f4f43 Standardize HttpRequester's url_base and path format (#17524)
* add trailing slash to base url if missing

* remove leading / from path

* Bump
2022-10-05 15:30:37 -07:00
Alexandre Girard
61a5a1e967 [#17107] Fix propagation of $options field in arrays (#17196)
* input can only be a string

* remove debug print

* cleanup tests

* fix in the factory

* Add a unit test

* fix for lists

* Update changelog

* Update changelog
2022-10-03 17:02:41 -07:00
Alexandre Girard
d6b79b8e52 Alex/limit paginator (#17197)
* remove page size from limit paginator

* Rename LimitPaginator to DefaultPaginator

* rename limit_options

* rename method

* cleanup

* comment

* update schema file

* Update changelog

* pin greenhouse connector

* fix doc in comment

* fix changelog

* missing -

* bump

* bump
2022-09-29 19:24:53 -07:00