airbyte-cdk 0.31.0__tar.gz → 0.31.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/PKG-INFO +1 -1
  2. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector_builder/message_grouper.py +54 -21
  3. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector_builder/models.py +7 -1
  4. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/PKG-INFO +1 -1
  5. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/setup.py +1 -1
  6. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/test_connector_builder_handler.py +22 -4
  7. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/test_message_grouper.py +20 -5
  8. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/LICENSE.txt +0 -0
  9. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/README.md +0 -0
  10. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/__init__.py +0 -0
  11. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/config_observation.py +0 -0
  12. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector.py +0 -0
  13. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector_builder/__init__.py +0 -0
  14. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector_builder/connector_builder_handler.py +0 -0
  15. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/connector_builder/main.py +0 -0
  16. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/destinations/__init__.py +0 -0
  17. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/destinations/destination.py +0 -0
  18. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/entrypoint.py +0 -0
  19. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/exception_handler.py +0 -0
  20. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/logger.py +0 -0
  21. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/models/__init__.py +0 -0
  22. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/models/airbyte_protocol.py +0 -0
  23. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/models/well_known_types.py +0 -0
  24. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/py.typed +0 -0
  25. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/__init__.py +0 -0
  26. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/abstract_source.py +0 -0
  27. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/config.py +0 -0
  28. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/connector_state_manager.py +0 -0
  29. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/__init__.py +0 -0
  30. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/__init__.py +0 -0
  31. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/declarative_authenticator.py +0 -0
  32. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/oauth.py +0 -0
  33. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/auth/token.py +0 -0
  34. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/__init__.py +0 -0
  35. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/check_stream.py +0 -0
  36. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/checks/connection_checker.py +0 -0
  37. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/create_partial.py +0 -0
  38. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/__init__.py +0 -0
  39. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/datetime_parser.py +0 -0
  40. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/datetime/min_max_datetime.py +0 -0
  41. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -0
  42. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_source.py +0 -0
  43. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/declarative_stream.py +0 -0
  44. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/__init__.py +0 -0
  45. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/decoder.py +0 -0
  46. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/decoders/json_decoder.py +0 -0
  47. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/exceptions.py +0 -0
  48. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/__init__.py +0 -0
  49. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/dpath_extractor.py +0 -0
  50. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/http_selector.py +0 -0
  51. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_extractor.py +0 -0
  52. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_filter.py +0 -0
  53. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/extractors/record_selector.py +0 -0
  54. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/incremental/__init__.py +0 -0
  55. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +0 -0
  56. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/__init__.py +0 -0
  57. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/filters.py +0 -0
  58. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_boolean.py +0 -0
  59. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_mapping.py +0 -0
  60. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolated_string.py +0 -0
  61. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/interpolation.py +0 -0
  62. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/jinja.py +0 -0
  63. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/interpolation/macros.py +0 -0
  64. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -0
  65. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/models/__init__.py +0 -0
  66. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +0 -0
  67. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/__init__.py +0 -0
  68. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/class_types_registry.py +0 -0
  69. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/custom_exceptions.py +0 -0
  70. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py +0 -0
  71. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +0 -0
  72. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py +0 -0
  73. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +0 -0
  74. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/__init__.py +0 -0
  75. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +0 -0
  76. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py +0 -0
  77. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +0 -0
  78. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/__init__.py +0 -0
  79. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  80. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  81. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/constant_backoff_strategy.py +0 -0
  82. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/exponential_backoff_strategy.py +0 -0
  83. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/header_helper.py +0 -0
  84. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_time_from_header_backoff_strategy.py +0 -0
  85. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py +0 -0
  86. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategy.py +0 -0
  87. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -0
  88. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_error_handler.py +0 -0
  89. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/error_handler.py +0 -0
  90. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +0 -0
  91. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_action.py +0 -0
  92. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/error_handlers/response_status.py +0 -0
  93. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/http_requester.py +0 -0
  94. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +0 -0
  95. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +0 -0
  96. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/no_pagination.py +0 -0
  97. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/paginator.py +0 -0
  98. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +0 -0
  99. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/cursor_pagination_strategy.py +0 -0
  100. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/offset_increment.py +0 -0
  101. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/page_increment.py +0 -0
  102. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/pagination_strategy.py +0 -0
  103. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_option.py +0 -0
  104. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +0 -0
  105. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py +0 -0
  106. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +0 -0
  107. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_options/request_options_provider.py +0 -0
  108. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/request_path.py +0 -0
  109. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/requesters/requester.py +0 -0
  110. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/__init__.py +0 -0
  111. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/retriever.py +0 -0
  112. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +0 -0
  113. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/__init__.py +0 -0
  114. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/default_schema_loader.py +0 -0
  115. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/inline_schema_loader.py +0 -0
  116. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py +0 -0
  117. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/schema/schema_loader.py +0 -0
  118. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/spec/__init__.py +0 -0
  119. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/spec/spec.py +0 -0
  120. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py +0 -0
  121. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/cartesian_product_stream_slicer.py +0 -0
  122. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py +0 -0
  123. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/__init__.py +0 -0
  124. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/add_fields.py +0 -0
  125. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/remove_fields.py +0 -0
  126. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/transformations/transformation.py +0 -0
  127. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/types.py +0 -0
  128. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/declarative/yaml_declarative_source.py +0 -0
  129. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/__init__.py +0 -0
  130. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/base_source.py +0 -0
  131. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/deprecated/client.py +0 -0
  132. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/__init__.py +0 -0
  133. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/singer_helpers.py +0 -0
  134. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/singer/source.py +0 -0
  135. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/source.py +0 -0
  136. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/__init__.py +0 -0
  137. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/availability_strategy.py +0 -0
  138. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/core.py +0 -0
  139. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/__init__.py +0 -0
  140. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/__init__.py +0 -0
  141. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/core.py +0 -0
  142. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/oauth.py +0 -0
  143. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/auth/token.py +0 -0
  144. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/availability_strategy.py +0 -0
  145. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/exceptions.py +0 -0
  146. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/http.py +0 -0
  147. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/rate_limiting.py +0 -0
  148. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py +0 -0
  149. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +0 -0
  150. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py +0 -0
  151. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +0 -0
  152. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/http/requests_native_auth/token.py +0 -0
  153. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/utils/__init__.py +0 -0
  154. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/streams/utils/stream_helper.py +0 -0
  155. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/__init__.py +0 -0
  156. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/casing.py +0 -0
  157. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/catalog_helpers.py +0 -0
  158. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/record_helper.py +0 -0
  159. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/schema_helpers.py +0 -0
  160. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/schema_models.py +0 -0
  161. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/sources/utils/transform.py +0 -0
  162. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/__init__.py +0 -0
  163. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/airbyte_secrets_utils.py +0 -0
  164. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/event_timing.py +0 -0
  165. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/schema_inferrer.py +0 -0
  166. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk/utils/traced_exception.py +0 -0
  167. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/SOURCES.txt +0 -0
  168. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/dependency_links.txt +0 -0
  169. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/requires.txt +0 -0
  170. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/airbyte_cdk.egg-info/top_level.txt +0 -0
  171. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/pyproject.toml +0 -0
  172. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/setup.cfg +0 -0
  173. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/source_declarative_manifest/__init__.py +0 -0
  174. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/source_declarative_manifest/main.py +0 -0
  175. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/__init__.py +0 -0
  176. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/connector_builder/utils.py +0 -0
  177. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/destinations/__init__.py +0 -0
  178. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/destinations/test_destination.py +0 -0
  179. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/singer/__init__.py +0 -0
  180. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/singer/test_singer_helpers.py +0 -0
  181. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/singer/test_singer_source.py +0 -0
  182. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/__init__.py +0 -0
  183. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/__init__.py +0 -0
  184. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/__init__.py +0 -0
  185. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_oauth.py +0 -0
  186. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_session_token_auth.py +0 -0
  187. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/auth/test_token_auth.py +0 -0
  188. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/checks/__init__.py +0 -0
  189. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/checks/test_check_stream.py +0 -0
  190. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/decoders/__init__.py +0 -0
  191. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/decoders/test_json_decoder.py +0 -0
  192. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/external_component.py +0 -0
  193. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/__init__.py +0 -0
  194. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_dpath_extractor.py +0 -0
  195. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_record_filter.py +0 -0
  196. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/extractors/test_record_selector.py +0 -0
  197. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/incremental/__init__.py +0 -0
  198. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/incremental/test_datetime_based_cursor.py +0 -0
  199. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/__init__.py +0 -0
  200. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_filters.py +0 -0
  201. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_boolean.py +0 -0
  202. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_mapping.py +0 -0
  203. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_interpolated_string.py +0 -0
  204. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_jinja.py +0 -0
  205. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/interpolation/test_macros.py +0 -0
  206. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/__init__.py +0 -0
  207. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_manifest_component_transformer.py +0 -0
  208. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_manifest_reference_resolver.py +0 -0
  209. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/test_model_to_component_factory.py +0 -0
  210. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/parsers/testing_components.py +0 -0
  211. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/__init__.py +0 -0
  212. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_list_partition_router.py +0 -0
  213. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_single_partition_router.py +0 -0
  214. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/partition_routers/test_substream_partition_router.py +0 -0
  215. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/__init__.py +0 -0
  216. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  217. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  218. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_constant_backoff.py +0 -0
  219. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_exponential_backoff.py +0 -0
  220. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_header_helper.py +0 -0
  221. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_time_from_header.py +0 -0
  222. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/backoff_strategies/test_wait_until_time_from_header.py +0 -0
  223. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_composite_error_handler.py +0 -0
  224. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py +0 -0
  225. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_http_response_filter.py +0 -0
  226. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/error_handlers/test_response_status.py +0 -0
  227. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/__init__.py +0 -0
  228. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_cursor_pagination_strategy.py +0 -0
  229. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_default_paginator.py +0 -0
  230. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_no_paginator.py +0 -0
  231. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_offset_increment.py +0 -0
  232. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_page_increment.py +0 -0
  233. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/paginators/test_request_option.py +0 -0
  234. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/request_options/__init__.py +0 -0
  235. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/request_options/test_interpolated_request_options_provider.py +0 -0
  236. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/test_http_requester.py +0 -0
  237. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/requesters/test_interpolated_request_input_provider.py +0 -0
  238. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/retrievers/__init__.py +0 -0
  239. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/retrievers/test_simple_retriever.py +0 -0
  240. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/__init__.py +0 -0
  241. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/source_test/SourceTest.py +0 -0
  242. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/source_test/__init__.py +0 -0
  243. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_default_schema_loader.py +0 -0
  244. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_inline_schema_loader.py +0 -0
  245. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/schema/test_json_file_schema_loader.py +0 -0
  246. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/states/__init__.py +0 -0
  247. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/stream_slicers/__init__.py +0 -0
  248. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/stream_slicers/test_cartesian_product_stream_slicer.py +0 -0
  249. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_create_partial.py +0 -0
  250. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_declarative_stream.py +0 -0
  251. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_manifest_declarative_source.py +0 -0
  252. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/declarative/test_yaml_declarative_source.py +0 -0
  253. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/__init__.py +0 -0
  254. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/__init__.py +0 -0
  255. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/auth/__init__.py +0 -0
  256. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/auth/test_auth.py +0 -0
  257. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/requests_native_auth/__init__.py +0 -0
  258. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/requests_native_auth/test_requests_native_auth.py +0 -0
  259. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/test_availability_strategy.py +0 -0
  260. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/http/test_http.py +0 -0
  261. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/test_availability_strategy.py +0 -0
  262. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/streams/test_streams_core.py +0 -0
  263. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/test_abstract_source.py +0 -0
  264. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/test_config.py +0 -0
  265. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/test_connector_state_manager.py +0 -0
  266. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/sources/test_source.py +0 -0
  267. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/utils/__init__.py +0 -0
  268. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/utils/test_schema_inferrer.py +0 -0
  269. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.1}/unit_tests/utils/test_secret_utils.py +0 -0
  270. {airbyte-cdk-0.31.0 → airbyte-cdk-0.31.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.31.0
3
+ Version: 0.31.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -9,11 +9,19 @@ from json import JSONDecodeError
9
9
  from typing import Any, Iterable, Iterator, Mapping, Optional, Union
10
10
  from urllib.parse import parse_qs, urlparse
11
11
 
12
- from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, StreamRead, StreamReadPages, StreamReadSlices
13
- from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, Type
12
+ from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, LogMessage, StreamRead, StreamReadPages, StreamReadSlices
14
13
  from airbyte_cdk.sources.declarative.declarative_source import DeclarativeSource
14
+ from airbyte_cdk.utils import AirbyteTracedException
15
15
  from airbyte_cdk.utils.schema_inferrer import SchemaInferrer
16
- from airbyte_protocol.models.airbyte_protocol import ConfiguredAirbyteCatalog
16
+ from airbyte_protocol.models.airbyte_protocol import (
17
+ AirbyteLogMessage,
18
+ AirbyteMessage,
19
+ AirbyteTraceMessage,
20
+ ConfiguredAirbyteCatalog,
21
+ Level,
22
+ TraceType,
23
+ )
24
+ from airbyte_protocol.models.airbyte_protocol import Type as MessageType
17
25
 
18
26
 
19
27
  class MessageGrouper:
@@ -42,14 +50,18 @@ class MessageGrouper:
42
50
 
43
51
  slices = []
44
52
  log_messages = []
45
- state = {} # No support for incremental sync
46
53
  for message_group in self._get_message_groups(
47
- source.read(self.logger, config, configured_catalog, state),
48
- schema_inferrer,
49
- record_limit,
54
+ self._read_stream(source, config, configured_catalog),
55
+ schema_inferrer,
56
+ record_limit,
50
57
  ):
51
58
  if isinstance(message_group, AirbyteLogMessage):
52
- log_messages.append({"message": message_group.message})
59
+ log_messages.append(LogMessage(**{"message": message_group.message, "level": message_group.level.value}))
60
+ elif isinstance(message_group, AirbyteTraceMessage):
61
+ if message_group.type == TraceType.ERROR:
62
+ error_message = f"{message_group.error.message} - {message_group.error.stack_trace}"
63
+ log_messages.append(LogMessage(**{"message": error_message, "level": "ERROR"}))
64
+
53
65
  else:
54
66
  slices.append(message_group)
55
67
 
@@ -63,8 +75,8 @@ class MessageGrouper:
63
75
  )
64
76
 
65
77
  def _get_message_groups(
66
- self, messages: Iterator[AirbyteMessage], schema_inferrer: SchemaInferrer, limit: int
67
- ) -> Iterable[Union[StreamReadPages, AirbyteLogMessage]]:
78
+ self, messages: Iterator[AirbyteMessage], schema_inferrer: SchemaInferrer, limit: int
79
+ ) -> Iterable[Union[StreamReadPages, AirbyteLogMessage, AirbyteTraceMessage]]:
68
80
  """
69
81
  Message groups are partitioned according to when request log messages are received. Subsequent response log messages
70
82
  and record messages belong to the prior request log message and when we encounter another request, append the latest
@@ -86,44 +98,56 @@ class MessageGrouper:
86
98
  current_slice_pages = []
87
99
  current_page_request: Optional[HttpRequest] = None
88
100
  current_page_response: Optional[HttpResponse] = None
101
+ had_error = False
89
102
 
90
103
  while records_count < limit and (message := next(messages, None)):
91
104
  if self._need_to_close_page(at_least_one_page_in_group, message):
92
- self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records)
105
+ self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, True)
93
106
  current_page_request = None
94
107
  current_page_response = None
95
108
 
96
- if at_least_one_page_in_group and message.type == Type.LOG and message.log.message.startswith("slice:"):
109
+ if at_least_one_page_in_group and message.type == MessageType.LOG and message.log.message.startswith("slice:"):
97
110
  yield StreamReadSlices(pages=current_slice_pages)
98
111
  current_slice_pages = []
99
112
  at_least_one_page_in_group = False
100
- elif message.type == Type.LOG and message.log.message.startswith("request:"):
113
+ elif message.type == MessageType.LOG and message.log.message.startswith("request:"):
101
114
  if not at_least_one_page_in_group:
102
115
  at_least_one_page_in_group = True
103
116
  current_page_request = self._create_request_from_log_message(message.log)
104
- elif message.type == Type.LOG and message.log.message.startswith("response:"):
117
+ elif message.type == MessageType.LOG and message.log.message.startswith("response:"):
105
118
  current_page_response = self._create_response_from_log_message(message.log)
106
- elif message.type == Type.LOG:
119
+ elif message.type == MessageType.LOG:
120
+ if message.log.level == Level.ERROR:
121
+ had_error = True
107
122
  yield message.log
108
- elif message.type == Type.RECORD:
123
+ elif message.type == MessageType.TRACE:
124
+ if message.trace.type == TraceType.ERROR:
125
+ had_error = True
126
+ yield message.trace
127
+ elif message.type == MessageType.RECORD:
109
128
  current_page_records.append(message.record.data)
110
129
  records_count += 1
111
130
  schema_inferrer.accumulate(message.record)
112
131
  else:
113
- self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records)
132
+ self._close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, validate_page_complete=not had_error)
114
133
  yield StreamReadSlices(pages=current_slice_pages)
115
134
 
116
135
  @staticmethod
117
- def _need_to_close_page(at_least_one_page_in_group, message):
136
+ def _need_to_close_page(at_least_one_page_in_group, message) -> bool:
118
137
  return (
119
138
  at_least_one_page_in_group
120
- and message.type == Type.LOG
139
+ and message.type == MessageType.LOG
121
140
  and (message.log.message.startswith("request:") or message.log.message.startswith("slice:"))
122
141
  )
123
142
 
124
143
  @staticmethod
125
- def _close_page(current_page_request, current_page_response, current_slice_pages, current_page_records):
126
- if not current_page_request or not current_page_response:
144
+ def _close_page(current_page_request, current_page_response, current_slice_pages, current_page_records, validate_page_complete: bool):
145
+ """
146
+ Close a page when parsing message groups
147
+ @param validate_page_complete: in some cases, we expect the CDK to not return a response. As of today, this will only happen before
148
+ an uncaught exception and therefore, the assumption is that `validate_page_complete=True` only on the last page that is being closed
149
+ """
150
+ if validate_page_complete and (not current_page_request or not current_page_response):
127
151
  raise ValueError("Every message grouping should have at least one request and response")
128
152
 
129
153
  current_slice_pages.append(
@@ -131,6 +155,15 @@ class MessageGrouper:
131
155
  )
132
156
  current_page_records.clear()
133
157
 
158
+ def _read_stream(self, source, config, configured_catalog) -> Iterator[AirbyteMessage]:
159
+ # the generator can raise an exception
160
+ # iterate over the generated messages. if next raise an exception, catch it and yield it as an AirbyteLogMessage
161
+ try:
162
+ yield from source.read(logger=self.logger, config=config, catalog=configured_catalog, state={})
163
+ except Exception as e:
164
+ error_message = f"{e.args[0] if len(e.args) > 0 else str(e)}"
165
+ yield AirbyteTracedException.from_exception(e, message=error_message).as_airbyte_message()
166
+
134
167
  def _create_request_from_log_message(self, log_message: AirbyteLogMessage) -> Optional[HttpRequest]:
135
168
  # TODO: As a temporary stopgap, the CDK emits request data as a log message string. Ideally this should come in the
136
169
  # form of a custom message object defined in the Airbyte protocol, but this unblocks us in the immediate while the
@@ -50,9 +50,15 @@ class StreamReadSlicesInner:
50
50
  state: Optional[Dict[str, Any]]
51
51
 
52
52
 
53
+ @dataclass
54
+ class LogMessage:
55
+ message: str
56
+ level: str
57
+
58
+
53
59
  @dataclass
54
60
  class StreamRead(object):
55
- logs: List[object]
61
+ logs: List[LogMessage]
56
62
  slices: List[StreamReadSlicesInner]
57
63
  test_read_limit_reached: bool
58
64
  inferred_schema: Optional[Dict[str, Any]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 0.31.0
3
+ Version: 0.31.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://github.com/airbytehq/airbyte
6
6
  Author: Airbyte
@@ -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.31.0",
20
+ version="0.31.1",
21
21
  description="A framework for writing Airbyte Connectors.",
22
22
  long_description=README,
23
23
  long_description_content_type="text/markdown",
@@ -3,6 +3,7 @@
3
3
  #
4
4
 
5
5
  import copy
6
+ import dataclasses
6
7
  import json
7
8
  from unittest import mock
8
9
  from unittest.mock import patch
@@ -11,7 +12,7 @@ import pytest
11
12
  from airbyte_cdk import connector_builder
12
13
  from airbyte_cdk.connector_builder.connector_builder_handler import list_streams, resolve_manifest
13
14
  from airbyte_cdk.connector_builder.main import handle_connector_builder_request, handle_request, read_stream
14
- from airbyte_cdk.connector_builder.models import StreamRead, StreamReadSlicesInner, StreamReadSlicesInnerPagesInner
15
+ from airbyte_cdk.connector_builder.models import LogMessage, StreamRead, StreamReadSlicesInner, StreamReadSlicesInnerPagesInner
15
16
  from airbyte_cdk.models import AirbyteMessage, AirbyteRecordMessage, ConfiguredAirbyteCatalog
16
17
  from airbyte_cdk.models import Type as MessageType
17
18
  from airbyte_cdk.sources.declarative.declarative_stream import DeclarativeStream
@@ -323,14 +324,31 @@ def test_read():
323
324
  assert output_record == expected_airbyte_message
324
325
 
325
326
 
326
- def test_read_returns_error_response():
327
+ @patch("traceback.TracebackException.from_exception")
328
+ def test_read_returns_error_response(mock_from_exception):
327
329
  class MockManifestDeclarativeSource:
328
330
  def read(self, logger, config, catalog, state):
329
- raise ValueError
331
+ raise ValueError("error_message")
332
+
333
+ stack_trace = "a stack trace"
334
+ mock_from_exception.return_value = stack_trace
330
335
 
331
336
  source = MockManifestDeclarativeSource()
332
337
  response = read_stream(source, TEST_READ_CONFIG, ConfiguredAirbyteCatalog.parse_obj(CONFIGURED_CATALOG))
333
- assert "Error reading" in response.trace.error.message
338
+
339
+ expected_stream_read = StreamRead(logs=[LogMessage("error_message - a stack trace", "ERROR")],
340
+ slices=[StreamReadSlicesInner(
341
+ pages=[StreamReadSlicesInnerPagesInner(records=[], request=None, response=None)],
342
+ slice_descriptor=None, state=None)],
343
+ test_read_limit_reached=False,
344
+ inferred_schema=None)
345
+
346
+ expected_message = AirbyteMessage(
347
+ type=MessageType.RECORD,
348
+ record=AirbyteRecordMessage(stream=_stream_name, data=dataclasses.asdict(expected_stream_read), emitted_at=1),
349
+ )
350
+ response.record.emitted_at = 1
351
+ assert response == expected_message
334
352
 
335
353
 
336
354
  @pytest.mark.parametrize(
@@ -8,7 +8,7 @@ from unittest.mock import MagicMock
8
8
 
9
9
  import pytest
10
10
  from airbyte_cdk.connector_builder.message_grouper import MessageGrouper
11
- from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, StreamRead, StreamReadPages
11
+ from airbyte_cdk.connector_builder.models import HttpRequest, HttpResponse, LogMessage, StreamRead, StreamReadPages
12
12
  from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, AirbyteRecordMessage, Level
13
13
  from airbyte_cdk.models import Type as MessageType
14
14
  from unit_tests.connector_builder.utils import create_configured_catalog
@@ -17,7 +17,7 @@ MAX_PAGES_PER_SLICE = 4
17
17
  MAX_SLICES = 3
18
18
 
19
19
  MANIFEST = {
20
- "version": "0.1.0",
20
+ "version": "0.30.0",
21
21
  "type": "DeclarativeSource",
22
22
  "definitions": {
23
23
  "selector": {"extractor": {"field_path": ["items"], "type": "DpathExtractor"}, "type": "RecordSelector"},
@@ -167,9 +167,9 @@ def test_get_grouped_messages_with_logs():
167
167
  ),
168
168
  ]
169
169
  expected_logs = [
170
- {"message": "log message before the request"},
171
- {"message": "log message during the page"},
172
- {"message": "log message after the response"},
170
+ LogMessage(**{"message": "log message before the request", "level": "INFO"}),
171
+ LogMessage(**{"message": "log message during the page", "level": "INFO"}),
172
+ LogMessage(**{"message": "log message after the response", "level": "INFO"}),
173
173
  ]
174
174
 
175
175
  mock_source = make_mock_source(
@@ -513,6 +513,21 @@ def test_get_grouped_messages_given_maximum_number_of_pages_then_test_read_limit
513
513
  assert stream_read.test_read_limit_reached
514
514
 
515
515
 
516
+ def test_read_stream_returns_error_if_stream_does_not_exist():
517
+ mock_source = MagicMock()
518
+ mock_source.read.side_effect = ValueError("error")
519
+
520
+ full_config = {**CONFIG, **{"__injected_declarative_manifest": MANIFEST}}
521
+
522
+ message_grouper = MessageGrouper(MAX_PAGES_PER_SLICE, MAX_SLICES)
523
+ actual_response = message_grouper.get_message_groups(source=mock_source, config=full_config,
524
+ configured_catalog=create_configured_catalog("not_in_manifest"))
525
+
526
+ assert 1 == len(actual_response.logs)
527
+ assert "Traceback" in actual_response.logs[0].message
528
+ assert "ERROR" in actual_response.logs[0].level
529
+
530
+
516
531
  def make_mock_source(return_value: Iterator) -> MagicMock:
517
532
  mock_source = MagicMock()
518
533
  mock_source.read.return_value = return_value
File without changes
File without changes