airbyte-cdk 0.35.4__tar.gz → 0.36.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/PKG-INFO +1 -1
  2. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector_builder/connector_builder_handler.py +3 -1
  3. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/abstract_source.py +13 -0
  4. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/declarative_stream.py +18 -8
  5. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +8 -1
  6. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +11 -0
  7. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/core.py +3 -5
  8. airbyte-cdk-0.36.1/airbyte_cdk/utils/stream_status_utils.py +36 -0
  9. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk.egg-info/PKG-INFO +1 -1
  10. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk.egg-info/SOURCES.txt +2 -0
  11. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk.egg-info/requires.txt +1 -1
  12. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/setup.py +2 -2
  13. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/connector_builder/test_connector_builder_handler.py +1 -0
  14. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/parsers/test_model_to_component_factory.py +26 -0
  15. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/retrievers/test_simple_retriever.py +42 -0
  16. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/test_declarative_stream.py +18 -7
  17. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/test_manifest_declarative_source.py +1 -1
  18. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/test_abstract_source.py +95 -15
  19. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/test_source.py +24 -18
  20. airbyte-cdk-0.36.1/unit_tests/utils/test_stream_status_utils.py +70 -0
  21. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/LICENSE.txt +0 -0
  22. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/README.md +0 -0
  23. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/__init__.py +0 -0
  24. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/config_observation.py +0 -0
  25. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector.py +0 -0
  26. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector_builder/__init__.py +0 -0
  27. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector_builder/main.py +0 -0
  28. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector_builder/message_grouper.py +0 -0
  29. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/connector_builder/models.py +0 -0
  30. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/destinations/__init__.py +0 -0
  31. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/destinations/destination.py +0 -0
  32. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/entrypoint.py +0 -0
  33. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/exception_handler.py +0 -0
  34. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/logger.py +0 -0
  35. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/models/__init__.py +0 -0
  36. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/models/airbyte_protocol.py +0 -0
  37. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/models/well_known_types.py +0 -0
  38. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/py.typed +0 -0
  39. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/__init__.py +0 -0
  40. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/config.py +0 -0
  41. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/connector_state_manager.py +0 -0
  42. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/__init__.py +0 -0
  43. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/auth/__init__.py +0 -0
  44. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/auth/declarative_authenticator.py +0 -0
  45. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/auth/oauth.py +0 -0
  46. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/auth/token.py +0 -0
  47. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/checks/__init__.py +0 -0
  48. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/checks/check_stream.py +0 -0
  49. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/checks/connection_checker.py +0 -0
  50. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/create_partial.py +0 -0
  51. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/datetime/__init__.py +0 -0
  52. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/datetime/datetime_parser.py +0 -0
  53. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/datetime/min_max_datetime.py +0 -0
  54. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -0
  55. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/declarative_source.py +0 -0
  56. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/decoders/__init__.py +0 -0
  57. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/decoders/decoder.py +0 -0
  58. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/decoders/json_decoder.py +0 -0
  59. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/exceptions.py +0 -0
  60. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/__init__.py +0 -0
  61. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/dpath_extractor.py +0 -0
  62. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/http_selector.py +0 -0
  63. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/record_extractor.py +0 -0
  64. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/record_filter.py +0 -0
  65. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/extractors/record_selector.py +0 -0
  66. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/incremental/__init__.py +0 -0
  67. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +0 -0
  68. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/__init__.py +0 -0
  69. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/filters.py +0 -0
  70. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_boolean.py +0 -0
  71. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_mapping.py +0 -0
  72. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_string.py +0 -0
  73. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/interpolation.py +0 -0
  74. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/jinja.py +0 -0
  75. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/interpolation/macros.py +0 -0
  76. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -0
  77. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/models/__init__.py +0 -0
  78. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +0 -0
  79. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/__init__.py +0 -0
  80. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +0 -0
  81. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/custom_exceptions.py +0 -0
  82. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py +0 -0
  83. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +0 -0
  84. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py +0 -0
  85. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/partition_routers/__init__.py +0 -0
  86. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +0 -0
  87. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py +0 -0
  88. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +0 -0
  89. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/__init__.py +0 -0
  90. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  91. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  92. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/constant_backoff_strategy.py +0 -0
  93. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/exponential_backoff_strategy.py +0 -0
  94. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/header_helper.py +0 -0
  95. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_time_from_header_backoff_strategy.py +0 -0
  96. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py +0 -0
  97. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategy.py +0 -0
  98. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -0
  99. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_error_handler.py +0 -0
  100. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/error_handler.py +0 -0
  101. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +0 -0
  102. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_action.py +0 -0
  103. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_status.py +0 -0
  104. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/http_requester.py +0 -0
  105. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +0 -0
  106. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +0 -0
  107. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/no_pagination.py +0 -0
  108. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/paginator.py +0 -0
  109. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +0 -0
  110. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/cursor_pagination_strategy.py +0 -0
  111. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/offset_increment.py +0 -0
  112. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/page_increment.py +0 -0
  113. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/pagination_strategy.py +0 -0
  114. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_option.py +0 -0
  115. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +0 -0
  116. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py +0 -0
  117. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +0 -0
  118. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_options/request_options_provider.py +0 -0
  119. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/request_path.py +0 -0
  120. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/requesters/requester.py +0 -0
  121. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/retrievers/__init__.py +0 -0
  122. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/retrievers/retriever.py +0 -0
  123. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/schema/__init__.py +0 -0
  124. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/schema/default_schema_loader.py +0 -0
  125. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/schema/inline_schema_loader.py +0 -0
  126. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py +0 -0
  127. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/schema/schema_loader.py +0 -0
  128. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/spec/__init__.py +0 -0
  129. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/spec/spec.py +0 -0
  130. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py +0 -0
  131. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/stream_slicers/cartesian_product_stream_slicer.py +0 -0
  132. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py +0 -0
  133. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/transformations/__init__.py +0 -0
  134. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/transformations/add_fields.py +0 -0
  135. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/transformations/remove_fields.py +0 -0
  136. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/transformations/transformation.py +0 -0
  137. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/types.py +0 -0
  138. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/declarative/yaml_declarative_source.py +0 -0
  139. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/deprecated/__init__.py +0 -0
  140. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/deprecated/base_source.py +0 -0
  141. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/deprecated/client.py +0 -0
  142. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/singer/__init__.py +0 -0
  143. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/singer/singer_helpers.py +0 -0
  144. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/singer/source.py +0 -0
  145. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/source.py +0 -0
  146. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/__init__.py +0 -0
  147. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/availability_strategy.py +0 -0
  148. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/__init__.py +0 -0
  149. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/auth/__init__.py +0 -0
  150. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/auth/core.py +0 -0
  151. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/auth/oauth.py +0 -0
  152. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/auth/token.py +0 -0
  153. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/availability_strategy.py +0 -0
  154. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/exceptions.py +0 -0
  155. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/http.py +0 -0
  156. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/rate_limiting.py +0 -0
  157. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py +0 -0
  158. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +0 -0
  159. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py +0 -0
  160. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +0 -0
  161. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/http/requests_native_auth/token.py +0 -0
  162. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/utils/__init__.py +0 -0
  163. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/streams/utils/stream_helper.py +0 -0
  164. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/__init__.py +0 -0
  165. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/casing.py +0 -0
  166. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/catalog_helpers.py +0 -0
  167. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/record_helper.py +0 -0
  168. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/schema_helpers.py +0 -0
  169. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/schema_models.py +0 -0
  170. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/sources/utils/transform.py +0 -0
  171. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/utils/__init__.py +0 -0
  172. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/utils/airbyte_secrets_utils.py +0 -0
  173. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/utils/event_timing.py +0 -0
  174. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/utils/schema_inferrer.py +0 -0
  175. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk/utils/traced_exception.py +0 -0
  176. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk.egg-info/dependency_links.txt +0 -0
  177. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/airbyte_cdk.egg-info/top_level.txt +0 -0
  178. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/pyproject.toml +0 -0
  179. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/setup.cfg +0 -0
  180. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/source_declarative_manifest/__init__.py +0 -0
  181. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/source_declarative_manifest/main.py +0 -0
  182. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/connector_builder/__init__.py +0 -0
  183. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/connector_builder/test_message_grouper.py +0 -0
  184. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/connector_builder/utils.py +0 -0
  185. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/destinations/__init__.py +0 -0
  186. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/destinations/test_destination.py +0 -0
  187. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/singer/__init__.py +0 -0
  188. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/singer/test_singer_helpers.py +0 -0
  189. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/singer/test_singer_source.py +0 -0
  190. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/__init__.py +0 -0
  191. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/__init__.py +0 -0
  192. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/auth/__init__.py +0 -0
  193. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/auth/test_oauth.py +0 -0
  194. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/auth/test_session_token_auth.py +0 -0
  195. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/auth/test_token_auth.py +0 -0
  196. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/checks/__init__.py +0 -0
  197. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/checks/test_check_stream.py +0 -0
  198. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/decoders/__init__.py +0 -0
  199. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/decoders/test_json_decoder.py +0 -0
  200. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/external_component.py +0 -0
  201. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/extractors/__init__.py +0 -0
  202. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/extractors/test_dpath_extractor.py +0 -0
  203. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/extractors/test_record_filter.py +0 -0
  204. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/extractors/test_record_selector.py +0 -0
  205. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/incremental/__init__.py +0 -0
  206. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/incremental/test_datetime_based_cursor.py +0 -0
  207. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/__init__.py +0 -0
  208. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_filters.py +0 -0
  209. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_interpolated_boolean.py +0 -0
  210. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_interpolated_mapping.py +0 -0
  211. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_interpolated_string.py +0 -0
  212. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_jinja.py +0 -0
  213. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/interpolation/test_macros.py +0 -0
  214. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/parsers/__init__.py +0 -0
  215. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/parsers/test_manifest_component_transformer.py +0 -0
  216. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/parsers/test_manifest_reference_resolver.py +0 -0
  217. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/parsers/testing_components.py +0 -0
  218. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/partition_routers/__init__.py +0 -0
  219. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/partition_routers/test_list_partition_router.py +0 -0
  220. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/partition_routers/test_single_partition_router.py +0 -0
  221. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/partition_routers/test_substream_partition_router.py +0 -0
  222. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/__init__.py +0 -0
  223. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  224. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  225. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_constant_backoff.py +0 -0
  226. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_exponential_backoff.py +0 -0
  227. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_header_helper.py +0 -0
  228. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_time_from_header.py +0 -0
  229. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_until_time_from_header.py +0 -0
  230. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/test_composite_error_handler.py +0 -0
  231. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py +0 -0
  232. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/test_http_response_filter.py +0 -0
  233. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/error_handlers/test_response_status.py +0 -0
  234. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/__init__.py +0 -0
  235. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_cursor_pagination_strategy.py +0 -0
  236. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_default_paginator.py +0 -0
  237. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_no_paginator.py +0 -0
  238. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_offset_increment.py +0 -0
  239. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_page_increment.py +0 -0
  240. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/paginators/test_request_option.py +0 -0
  241. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/request_options/__init__.py +0 -0
  242. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/request_options/test_interpolated_request_options_provider.py +0 -0
  243. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/test_http_requester.py +0 -0
  244. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/requesters/test_interpolated_request_input_provider.py +0 -0
  245. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/retrievers/__init__.py +0 -0
  246. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/__init__.py +0 -0
  247. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/source_test/SourceTest.py +0 -0
  248. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/source_test/__init__.py +0 -0
  249. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/test_default_schema_loader.py +0 -0
  250. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/test_inline_schema_loader.py +0 -0
  251. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/schema/test_json_file_schema_loader.py +0 -0
  252. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/states/__init__.py +0 -0
  253. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/stream_slicers/__init__.py +0 -0
  254. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/stream_slicers/test_cartesian_product_stream_slicer.py +0 -0
  255. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/test_create_partial.py +0 -0
  256. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/declarative/test_yaml_declarative_source.py +0 -0
  257. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/__init__.py +0 -0
  258. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/__init__.py +0 -0
  259. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/auth/__init__.py +0 -0
  260. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/auth/test_auth.py +0 -0
  261. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/requests_native_auth/__init__.py +0 -0
  262. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/requests_native_auth/test_requests_native_auth.py +0 -0
  263. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/test_availability_strategy.py +0 -0
  264. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/http/test_http.py +0 -0
  265. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/test_availability_strategy.py +0 -0
  266. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/streams/test_streams_core.py +0 -0
  267. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/test_config.py +0 -0
  268. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/sources/test_connector_state_manager.py +0 -0
  269. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/utils/__init__.py +0 -0
  270. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/utils/test_schema_inferrer.py +0 -0
  271. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/utils/test_secret_utils.py +0 -0
  272. {airbyte-cdk-0.35.4 → airbyte-cdk-0.36.1}/unit_tests/utils/test_traced_exception.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 0.35.4
3
+ Version: 0.36.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -50,7 +50,9 @@ def create_source(config: Mapping[str, Any], limits: TestReadLimits) -> Manifest
50
50
  component_factory=ModelToComponentFactory(
51
51
  emit_connector_builder_messages=True,
52
52
  limit_pages_fetched_per_slice=limits.max_pages_per_slice,
53
- limit_slices_fetched=limits.max_slices)
53
+ limit_slices_fetched=limits.max_slices,
54
+ disable_retries=True
55
+ )
54
56
  )
55
57
 
56
58
 
@@ -13,6 +13,7 @@ from airbyte_cdk.models import (
13
13
  AirbyteLogMessage,
14
14
  AirbyteMessage,
15
15
  AirbyteStateMessage,
16
+ AirbyteStreamStatus,
16
17
  ConfiguredAirbyteCatalog,
17
18
  ConfiguredAirbyteStream,
18
19
  Level,
@@ -28,6 +29,7 @@ from airbyte_cdk.sources.streams.http.http import HttpStream
28
29
  from airbyte_cdk.sources.utils.record_helper import stream_data_to_airbyte_message
29
30
  from airbyte_cdk.sources.utils.schema_helpers import InternalConfig, split_config
30
31
  from airbyte_cdk.utils.event_timing import create_timer
32
+ from airbyte_cdk.utils.stream_status_utils import as_airbyte_message as stream_status_as_airbyte_message
31
33
  from airbyte_cdk.utils.traced_exception import AirbyteTracedException
32
34
 
33
35
 
@@ -113,6 +115,8 @@ class AbstractSource(Source, ABC):
113
115
  continue
114
116
  try:
115
117
  timer.start_event(f"Syncing stream {configured_stream.stream.name}")
118
+ logger.info(f"Marking stream {configured_stream.stream.name} as STARTED")
119
+ yield stream_status_as_airbyte_message(configured_stream, AirbyteStreamStatus.STARTED)
116
120
  yield from self._read_stream(
117
121
  logger=logger,
118
122
  stream_instance=stream_instance,
@@ -120,10 +124,15 @@ class AbstractSource(Source, ABC):
120
124
  state_manager=state_manager,
121
125
  internal_config=internal_config,
122
126
  )
127
+ logger.info(f"Marking stream {configured_stream.stream.name} as STOPPED")
128
+ yield stream_status_as_airbyte_message(configured_stream, AirbyteStreamStatus.COMPLETE)
123
129
  except AirbyteTracedException as e:
130
+ yield stream_status_as_airbyte_message(configured_stream, AirbyteStreamStatus.INCOMPLETE)
124
131
  raise e
125
132
  except Exception as e:
126
133
  logger.exception(f"Encountered an exception while reading stream {configured_stream.stream.name}")
134
+ logger.info(f"Marking stream {configured_stream.stream.name} as STOPPED")
135
+ yield stream_status_as_airbyte_message(configured_stream, AirbyteStreamStatus.INCOMPLETE)
127
136
  display_message = stream_instance.get_error_display_message(e)
128
137
  if display_message:
129
138
  raise AirbyteTracedException.from_exception(e, message=display_message) from e
@@ -185,6 +194,10 @@ class AbstractSource(Source, ABC):
185
194
  for record in record_iterator:
186
195
  if record.type == MessageType.RECORD:
187
196
  record_counter += 1
197
+ if record_counter == 1:
198
+ logger.info(f"Marking stream {stream_name} as RUNNING")
199
+ # If we just read the first record of the stream, emit the transition to the RUNNING state
200
+ yield stream_status_as_airbyte_message(configured_stream, AirbyteStreamStatus.RUNNING)
188
201
  yield record
189
202
 
190
203
  logger.info(f"Read {record_counter} records from {stream_name} stream")
@@ -5,14 +5,14 @@
5
5
  from dataclasses import InitVar, dataclass, field
6
6
  from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Union
7
7
 
8
- from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, AirbyteTraceMessage, SyncMode
8
+ from airbyte_cdk.models import AirbyteMessage, SyncMode
9
9
  from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
10
10
  from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever
11
11
  from airbyte_cdk.sources.declarative.schema import DefaultSchemaLoader
12
12
  from airbyte_cdk.sources.declarative.schema.schema_loader import SchemaLoader
13
13
  from airbyte_cdk.sources.declarative.transformations import RecordTransformation
14
14
  from airbyte_cdk.sources.declarative.types import Config, StreamSlice
15
- from airbyte_cdk.sources.streams.core import Stream
15
+ from airbyte_cdk.sources.streams.core import Stream, StreamData
16
16
 
17
17
 
18
18
  @dataclass
@@ -102,17 +102,27 @@ class DeclarativeStream(Stream):
102
102
 
103
103
  def _apply_transformations(
104
104
  self,
105
- message_or_record_data: Union[AirbyteMessage, AirbyteLogMessage, AirbyteTraceMessage, Mapping[str, Any]],
105
+ message_or_record_data: StreamData,
106
106
  config: Config,
107
107
  stream_slice: StreamSlice,
108
108
  ):
109
- # If the input is an AirbyteRecord, transform the record's data
110
- # If the input is another type of Airbyte Message, return it as is
109
+ # If the input is an AirbyteMessage with a record, transform the record's data
110
+ # If the input is another type of AirbyteMessage, return it as is
111
111
  # If the input is a dict, transform it
112
- if isinstance(message_or_record_data, AirbyteLogMessage) or isinstance(message_or_record_data, AirbyteTraceMessage):
113
- return message_or_record_data
112
+ if isinstance(message_or_record_data, AirbyteMessage):
113
+ if message_or_record_data.record:
114
+ record = message_or_record_data.record.data
115
+ else:
116
+ return message_or_record_data
117
+ elif isinstance(message_or_record_data, dict):
118
+ record = message_or_record_data
119
+ else:
120
+ # Raise an error because this is unexpected and indicative of a typing problem in the CDK
121
+ raise ValueError(
122
+ f"Unexpected record type. Expected {StreamData}. Got {type(message_or_record_data)}. This is probably due to a bug in the CDK."
123
+ )
114
124
  for transformation in self.transformations:
115
- transformation.transform(message_or_record_data, config=config, stream_state=self.state, stream_slice=stream_slice)
125
+ transformation.transform(record, config=config, stream_state=self.state, stream_slice=stream_slice)
116
126
 
117
127
  return message_or_record_data
118
128
 
@@ -112,12 +112,17 @@ DEFAULT_BACKOFF_STRATEGY = ExponentialBackoffStrategy
112
112
 
113
113
  class ModelToComponentFactory:
114
114
  def __init__(
115
- self, limit_pages_fetched_per_slice: int = None, limit_slices_fetched: int = None, emit_connector_builder_messages: bool = False
115
+ self,
116
+ limit_pages_fetched_per_slice: int = None,
117
+ limit_slices_fetched: int = None,
118
+ emit_connector_builder_messages: bool = False,
119
+ disable_retries=False,
116
120
  ):
117
121
  self._init_mappings()
118
122
  self._limit_pages_fetched_per_slice = limit_pages_fetched_per_slice
119
123
  self._limit_slices_fetched = limit_slices_fetched
120
124
  self._emit_connector_builder_messages = emit_connector_builder_messages
125
+ self._disable_retries = disable_retries
121
126
 
122
127
  def _init_mappings(self):
123
128
  self.PYDANTIC_MODEL_TO_CONSTRUCTOR: [Type[BaseModel], Callable] = {
@@ -779,6 +784,7 @@ class ModelToComponentFactory:
779
784
  config=config,
780
785
  maximum_number_of_slices=self._limit_slices_fetched,
781
786
  parameters=model.parameters,
787
+ disable_retries=self._disable_retries,
782
788
  )
783
789
  return SimpleRetriever(
784
790
  name=name,
@@ -789,6 +795,7 @@ class ModelToComponentFactory:
789
795
  stream_slicer=stream_slicer or SinglePartitionRouter(parameters={}),
790
796
  config=config,
791
797
  parameters=model.parameters,
798
+ disable_retries=self._disable_retries,
792
799
  )
793
800
 
794
801
  @staticmethod
@@ -50,6 +50,8 @@ class SimpleRetriever(Retriever, HttpStream):
50
50
  parameters (Mapping[str, Any]): Additional runtime parameters to be used for string interpolation
51
51
  """
52
52
 
53
+ _DEFAULT_MAX_RETRY = 5
54
+
53
55
  requester: Requester
54
56
  record_selector: HttpSelector
55
57
  config: Config
@@ -61,6 +63,7 @@ class SimpleRetriever(Retriever, HttpStream):
61
63
  paginator: Optional[Paginator] = None
62
64
  stream_slicer: Optional[StreamSlicer] = SinglePartitionRouter(parameters={})
63
65
  emit_connector_builder_messages: bool = False
66
+ disable_retries: bool = False
64
67
 
65
68
  def __post_init__(self, parameters: Mapping[str, Any]):
66
69
  self.paginator = self.paginator or NoPagination(parameters=parameters)
@@ -95,6 +98,14 @@ class SimpleRetriever(Retriever, HttpStream):
95
98
  # never raise on http_errors because this overrides the error handler logic...
96
99
  return False
97
100
 
101
+ @property
102
+ def max_retries(self) -> Union[int, None]:
103
+ if self.disable_retries:
104
+ return 0
105
+ if hasattr(self.requester.error_handler, "max_retries"):
106
+ return self.requester.error_handler.max_retries
107
+ return self._DEFAULT_MAX_RETRY
108
+
98
109
  def should_retry(self, response: requests.Response) -> bool:
99
110
  """
100
111
  Specifies conditions for backoff based on the response from the server.
@@ -11,7 +11,7 @@ from functools import lru_cache
11
11
  from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Tuple, Union
12
12
 
13
13
  import airbyte_cdk.sources.utils.casing as casing
14
- from airbyte_cdk.models import AirbyteLogMessage, AirbyteStream, AirbyteTraceMessage, SyncMode
14
+ from airbyte_cdk.models import AirbyteMessage, AirbyteStream, SyncMode
15
15
 
16
16
  # list of all possible HTTP methods which can be used for sending of request bodies
17
17
  from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
@@ -24,10 +24,8 @@ if typing.TYPE_CHECKING:
24
24
 
25
25
  # A stream's read method can return one of the following types:
26
26
  # Mapping[str, Any]: The content of an AirbyteRecordMessage
27
- # AirbyteRecordMessage: An AirbyteRecordMessage
28
- # AirbyteLogMessage: A log message
29
- # AirbyteTraceMessage: A trace message
30
- StreamData = Union[Mapping[str, Any], AirbyteLogMessage, AirbyteTraceMessage]
27
+ # AirbyteMessage: An AirbyteMessage. Could be of any type
28
+ StreamData = Union[Mapping[str, Any], AirbyteMessage]
31
29
 
32
30
 
33
31
  def package_name_from_class(cls: object) -> str:
@@ -0,0 +1,36 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ from datetime import datetime
7
+
8
+ from airbyte_cdk.models import (
9
+ AirbyteMessage,
10
+ AirbyteStreamStatus,
11
+ AirbyteStreamStatusTraceMessage,
12
+ AirbyteTraceMessage,
13
+ ConfiguredAirbyteStream,
14
+ StreamDescriptor,
15
+ TraceType,
16
+ )
17
+ from airbyte_cdk.models import Type as MessageType
18
+
19
+
20
+ def as_airbyte_message(stream: ConfiguredAirbyteStream, current_status: AirbyteStreamStatus) -> AirbyteMessage:
21
+ """
22
+ Builds an AirbyteStreamStatusTraceMessage for the provided stream
23
+ """
24
+
25
+ now_millis = datetime.now().timestamp() * 1000.0
26
+
27
+ trace_message = AirbyteTraceMessage(
28
+ type=TraceType.STREAM_STATUS,
29
+ emitted_at=now_millis,
30
+ stream_status=AirbyteStreamStatusTraceMessage(
31
+ stream_descriptor=StreamDescriptor(name=stream.stream.name, namespace=stream.stream.namespace),
32
+ status=current_status,
33
+ ),
34
+ )
35
+
36
+ return AirbyteMessage(type=MessageType.TRACE, trace=trace_message)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 0.35.4
3
+ Version: 0.36.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -165,6 +165,7 @@ airbyte_cdk/utils/__init__.py
165
165
  airbyte_cdk/utils/airbyte_secrets_utils.py
166
166
  airbyte_cdk/utils/event_timing.py
167
167
  airbyte_cdk/utils/schema_inferrer.py
168
+ airbyte_cdk/utils/stream_status_utils.py
168
169
  airbyte_cdk/utils/traced_exception.py
169
170
  source_declarative_manifest/__init__.py
170
171
  source_declarative_manifest/main.py
@@ -265,4 +266,5 @@ unit_tests/sources/streams/http/requests_native_auth/test_requests_native_auth.p
265
266
  unit_tests/utils/__init__.py
266
267
  unit_tests/utils/test_schema_inferrer.py
267
268
  unit_tests/utils/test_secret_utils.py
269
+ unit_tests/utils/test_stream_status_utils.py
268
270
  unit_tests/utils/test_traced_exception.py
@@ -1,4 +1,4 @@
1
- airbyte-protocol-models==1.0.0
1
+ airbyte-protocol-models==0.3.6
2
2
  backoff
3
3
  dpath~=2.0.1
4
4
  isodate~=0.6.1
@@ -17,7 +17,7 @@ setup(
17
17
  name="airbyte-cdk",
18
18
  # The version of the airbyte-cdk package is used at runtime to validate manifests. That validation must be
19
19
  # updated if our semver format changes such as using release candidate versions.
20
- version="0.35.4",
20
+ version="0.36.1",
21
21
  description="A framework for writing Airbyte Connectors.",
22
22
  long_description=README,
23
23
  long_description_content_type="text/markdown",
@@ -46,7 +46,7 @@ setup(
46
46
  packages=find_packages(exclude=("unit_tests",)),
47
47
  package_data={"airbyte_cdk": ["py.typed", "sources/declarative/declarative_component_schema.yaml"]},
48
48
  install_requires=[
49
- "airbyte-protocol-models==1.0.0",
49
+ "airbyte-protocol-models==0.3.6",
50
50
  "backoff",
51
51
  "dpath~=2.0.1",
52
52
  "isodate~=0.6.1",
@@ -566,6 +566,7 @@ def test_create_source():
566
566
  assert isinstance(source, ManifestDeclarativeSource)
567
567
  assert source._constructor._limit_pages_fetched_per_slice == limits.max_pages_per_slice
568
568
  assert source._constructor._limit_slices_fetched == limits.max_slices
569
+ assert source.streams(config={})[0].retriever.max_retries == 0
569
570
 
570
571
 
571
572
  def request_log_message(request: dict) -> AirbyteMessage:
@@ -1360,3 +1360,29 @@ def test_simple_retriever_emit_log_messages():
1360
1360
  )
1361
1361
 
1362
1362
  assert isinstance(retriever, SimpleRetrieverTestReadDecorator)
1363
+
1364
+
1365
+ def test_ignore_retry():
1366
+ requester_model = {
1367
+ "type": "SimpleRetriever",
1368
+ "record_selector": {
1369
+ "type": "RecordSelector",
1370
+ "extractor": {
1371
+ "type": "DpathExtractor",
1372
+ "field_path": [],
1373
+ },
1374
+ },
1375
+ "requester": {"type": "HttpRequester", "name": "list", "url_base": "orange.com", "path": "/v1/api"},
1376
+ }
1377
+
1378
+ connector_builder_factory = ModelToComponentFactory(disable_retries=True)
1379
+ retriever = connector_builder_factory.create_component(
1380
+ model_type=SimpleRetrieverModel,
1381
+ component_definition=requester_model,
1382
+ config={},
1383
+ name="Test",
1384
+ primary_key="id",
1385
+ stream_slicer=None,
1386
+ )
1387
+
1388
+ assert retriever.max_retries == 0
@@ -256,6 +256,48 @@ def test_parse_response(test_name, status_code, response_status, len_expected_re
256
256
  assert len(records) == len_expected_records
257
257
 
258
258
 
259
+ def test_max_retries_given_error_handler_has_max_retries():
260
+ requester = MagicMock()
261
+ requester.error_handler = MagicMock()
262
+ requester.error_handler.max_retries = 10
263
+ retriever = SimpleRetriever(
264
+ name="stream_name",
265
+ primary_key=primary_key,
266
+ requester=requester,
267
+ record_selector=MagicMock(),
268
+ parameters={},
269
+ config={}
270
+ )
271
+ assert retriever.max_retries == 10
272
+
273
+
274
+ def test_max_retries_given_error_handler_without_max_retries():
275
+ requester = MagicMock()
276
+ requester.error_handler = MagicMock(spec=[u'without_max_retries_attribute'])
277
+ retriever = SimpleRetriever(
278
+ name="stream_name",
279
+ primary_key=primary_key,
280
+ requester=requester,
281
+ record_selector=MagicMock(),
282
+ parameters={},
283
+ config={}
284
+ )
285
+ assert retriever.max_retries == 5
286
+
287
+
288
+ def test_max_retries_given_disable_retries():
289
+ retriever = SimpleRetriever(
290
+ name="stream_name",
291
+ primary_key=primary_key,
292
+ requester=MagicMock(),
293
+ record_selector=MagicMock(),
294
+ disable_retries=True,
295
+ parameters={},
296
+ config={}
297
+ )
298
+ assert retriever.max_retries == 0
299
+
300
+
259
301
  @pytest.mark.parametrize(
260
302
  "test_name, response_action, retry_in, expected_backoff_time",
261
303
  [
@@ -5,7 +5,16 @@
5
5
  from unittest import mock
6
6
  from unittest.mock import MagicMock, call
7
7
 
8
- from airbyte_cdk.models import AirbyteLogMessage, AirbyteTraceMessage, Level, SyncMode, TraceType
8
+ from airbyte_cdk.models import (
9
+ AirbyteLogMessage,
10
+ AirbyteMessage,
11
+ AirbyteRecordMessage,
12
+ AirbyteTraceMessage,
13
+ Level,
14
+ SyncMode,
15
+ TraceType,
16
+ Type,
17
+ )
9
18
  from airbyte_cdk.sources.declarative.declarative_stream import DeclarativeStream
10
19
  from airbyte_cdk.sources.declarative.transformations import AddFields, RecordTransformation
11
20
  from airbyte_cdk.sources.declarative.transformations.add_fields import AddedFieldDefinition
@@ -24,8 +33,8 @@ def test_declarative_stream():
24
33
  records = [
25
34
  {"pk": 1234, "field": "value"},
26
35
  {"pk": 4567, "field": "different_value"},
27
- AirbyteLogMessage(level=Level.INFO, message="This is a log message"),
28
- AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345),
36
+ AirbyteMessage(type=Type.LOG, log=AirbyteLogMessage(level=Level.INFO, message="This is a log message")),
37
+ AirbyteMessage(type=Type.TRACE, trace=AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345)),
29
38
  ]
30
39
  stream_slices = [
31
40
  {"date": "2021-01-01"},
@@ -84,15 +93,17 @@ def test_declarative_stream_with_add_fields_transform():
84
93
  retriever_records = [
85
94
  {"pk": 1234, "field": "value"},
86
95
  {"pk": 4567, "field": "different_value"},
87
- AirbyteLogMessage(level=Level.INFO, message="This is a log message"),
88
- AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345),
96
+ AirbyteMessage(type=Type.RECORD, record=AirbyteRecordMessage(data={"pk": 1357, "field": "a_value"}, emitted_at=12344, stream="stream")),
97
+ AirbyteMessage(type=Type.LOG, log=AirbyteLogMessage(level=Level.INFO, message="This is a log message")),
98
+ AirbyteMessage(type=Type.TRACE, trace=AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345)),
89
99
  ]
90
100
 
91
101
  expected_records = [
92
102
  {"pk": 1234, "field": "value", "added_key": "added_value"},
93
103
  {"pk": 4567, "field": "different_value", "added_key": "added_value"},
94
- AirbyteLogMessage(level=Level.INFO, message="This is a log message"),
95
- AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345),
104
+ AirbyteMessage(type=Type.RECORD, record=AirbyteRecordMessage(data={"pk": 1357, "field": "a_value", "added_key": "added_value"}, emitted_at=12344, stream="stream")),
105
+ AirbyteMessage(type=Type.LOG, log=AirbyteLogMessage(level=Level.INFO, message="This is a log message")),
106
+ AirbyteMessage(type=Type.TRACE, trace=AirbyteTraceMessage(type=TraceType.ERROR, emitted_at=12345)),
96
107
  ]
97
108
  stream_slices = [
98
109
  {"date": "2021-01-01"},
@@ -1242,7 +1242,7 @@ def _create_page(response_body):
1242
1242
  def test_read_manifest_declarative_source(test_name, manifest, pages, expected_records, expected_calls):
1243
1243
  _stream_name = "Rates"
1244
1244
  with patch.object(HttpStream, "_fetch_next_page", side_effect=pages) as mock_http_stream:
1245
- output_data = [message.record.data for message in _run_read(manifest, _stream_name)]
1245
+ output_data = [message.record.data for message in _run_read(manifest, _stream_name) if message.record]
1246
1246
  assert expected_records == output_data
1247
1247
  mock_http_stream.assert_has_calls(expected_calls)
1248
1248