1
0
mirror of synced 2026-01-20 12:07:14 -05:00
Commit Graph

465 Commits

Author SHA1 Message Date
Maxime Carbonneau-Leclerc
d2c8e63ea5 Fix partitioned state saving issue (#37389) 2024-04-17 22:57:45 -04:00
Natik Gadzhi
33a5cf777b [Python CDK] Delete SingerSource (#37364) 2024-04-17 07:21:22 -07:00
Maxime Carbonneau-Leclerc
a900c7841f Add StreamDescriptor as params of AirbyteTracedException.__init__ (#37108) 2024-04-12 17:11:12 -04:00
Ella Rohm-Ensing
b7819d9f6c python: assert actual == expected ordering (#36980) 2024-04-11 15:16:33 +00:00
Maxime Carbonneau-Leclerc
bbf69aea7f Concurrent CDK: support partitioned states (#36811) 2024-04-09 16:48:12 -04:00
Erick Corona
23c280b651 Fix empty internal_message empty when ExceptionWithDisplayMessage raised (#36901) 2024-04-09 08:15:15 -06:00
Ella Rohm-Ensing
51d1353593 Move source-declarative-manifest to a standard source, published in step with python cdk (#36501) 2024-04-05 11:42:10 -05:00
Christo Grabowski
e74d936350 CDK: updated error message for missing streams (#36833) 2024-04-04 15:39:40 -04:00
Serhii Lazebnyi
033decc8c2 add backward compatibility for an old close slice logic (#36774) 2024-04-03 03:13:22 +02:00
Alexandre Girard
7676892ca9 low-code: Fix cursor pagination instantiation if the stop_condition is a string (#36760) 2024-04-02 14:03:27 -07:00
Alexandre Girard
4af69fc20d low-code: Add last_page_size and last_record to pagination context (#36408) 2024-04-02 10:43:30 -07:00
Serhii Lazebnyi
604a2dfee8 fix wrong partition key definition after legacy state migration (#36719) 2024-04-01 17:08:03 +02:00
Alexandre Girard
b27ddfe19e connector-builder: return full url-encoded URL instead of separating parameters (#36680) 2024-03-28 18:49:35 -07:00
Serhii Lazebnyi
c3c87ea1a5 follow up to #36294: allow migrate sub stream state with custom partition router (#36590) 2024-03-28 23:39:26 +01:00
Alexandre Girard
634db576dc Python CDK: rename a unit test (#36556) 2024-03-27 17:00:38 -07:00
Brian Lai
624415d111 [airbyte-cdk] emit source recordCount as float instead of integer (#36560)
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
2024-03-27 16:02:30 -04:00
Ella Rohm-Ensing
0c367680b0 Fix E721 errors in the CDK (#36490) 2024-03-26 18:05:33 +00:00
Alexandre Girard
118a864ea2 low-code: Add string filter (#36393)
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
2024-03-25 17:02:31 -07:00
Alexandre Girard
28591c3481 per partition state and custom state migrations (#36294) 2024-03-25 16:05:55 -07:00
Roman Yermilov [GL]
242dd6a425 Airbyte CDK: request options allowed to be an array (#36357) 2024-03-22 07:07:44 +01:00
Brian Lai
728c92cba1 [airbyte-cdk] Stream should not extract state using legacy get_updated_state if no cursor (#36342) 2024-03-20 23:47:23 -04:00
Anatolii Yatsuk
157be91cb1 File-based CDK: Add skip_wrong_number_of_fields_error parameter for CSV parser (#36237)
Co-authored-by: Catherine Noll <clnoll@users.noreply.github.com>
2024-03-20 22:49:49 +02:00
Maxime Carbonneau-Leclerc
2f34f084e4 [ISSUE #6548] make all fields nullable except from pk and cursor field (#36201) 2024-03-20 09:48:38 -04:00
Alex Birdsall
44f784e200 Remove most_recent_record arg from Cursor.close_slice (#36216) 2024-03-18 18:28:50 -07:00
Artem Inzhyyants
240aa0180d Airbyte CDK (low code): add refresh_token_error handler to DeclarativeOauth2Authenticator (#36058)
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2024-03-18 18:52:58 +01:00
Alexandre Girard
875e5dfacb low-code: Allow developers to use a custom schema loader (#36040) 2024-03-18 09:42:16 -07:00
Alex Birdsall
a6a1b3c0c3 Base datetime cursor state off latest observed record (#35843) 2024-03-15 15:06:43 -07:00
Tobias Macey
f67938993e [airbyte-cdk] Fix tab delimiter configuration in CSV file type (#35901) 2024-03-13 13:46:32 -03:00
Alexandre Girard
15b954546f raise exception with the full class name if a class for a custom comp… (#35868) 2024-03-12 12:18:38 -07:00
Brian Lai
b1f3b8a36f [airbyte-cdk] entrypoint wrapper should use per-stream state not legacy format (#35976) 2024-03-11 19:09:08 -04:00
Ella Rohm-Ensing
2ac5248387 Emit record counts in state messages for concurrent streams (#35907)
Co-authored-by: brianjlai <brian.lai@airbyte.io>
Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com>
2024-03-08 19:08:59 -05:00
Ella Rohm-Ensing
a4dca3b45b CDK: assert >0 state messages per read (fix tests) (#35906)
<!--
Thanks for your contribution! 
Before you submit the pull request, 
I'd like to kindly remind you to take a moment and read through our guidelines
to ensure that your contribution aligns with the type of contributions our project accepts.
All the information you need can be found here:
   https://docs.airbyte.com/contributing-to-airbyte/

We truly appreciate your interest in contributing to Airbyte,
and we're excited to see what you have to offer! 

If you have any questions or need any assistance, feel free to reach out in #contributions Slack channel.
-->

## What
* After https://github.com/airbytehq/airbyte/pull/35905, we should be emitting a state message with every successful sync. However there are a few tests that were too lenient and weren't actually _successful_ syncs. This PR fixes those cases and adds validation that we emit at least one state message per successful sync. 

## How
* Add an assertion that we get at least 1 state message for a successful sync 
* Fix some tests that previously "output 0 expected records" but actually errored silently - do not run them as read tests
* Fix a test that failed silently due to lack of support for multi-format
* Add a new test for syncs that output 0 records successfully

## 🚨 User Impact 🚨
None - test changes


## Pre-merge Actions
*Expand the relevant checklist and delete the others.*

<details><summary><strong>New Connector</strong></summary>

### Community member or Airbyter

- **Community member?** Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run `./gradlew :airbyte-integrations:connectors:<name>:integrationTest`.
- Connector version is set to `0.0.1`
    - `Dockerfile` has version `0.0.1`
- Documentation updated
    - Connector's `README.md`
    - Connector's `bootstrap.md`. See [description and examples](https://docs.google.com/document/d/1ypdgmwmEHWv-TrO4_YOQ7pAJGVrMp5BOkEVh831N260/edit?usp=sharing)
    - `docs/integrations/<source or destination>/<name>.md` including changelog with an entry for the initial version. See changelog [example](https://docs.airbyte.io/integrations/sources/stripe#changelog)
    - `docs/integrations/README.md`

### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Updating a connector</strong></summary>

### Community member or Airbyter

- Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added


### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Connector Generator</strong></summary>

- Issue acceptance criteria met
- PR name follows [PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook)
- If adding a new generator, add it to the [list of scaffold modules being tested](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connector-templates/generator/build.gradle#L41)
- The generator test modules (all connectors with `-scaffold` in their name) have been updated with the latest scaffold by running `./gradlew :airbyte-integrations:connector-templates:generator:generateScaffolds` then checking in your changes
- Documentation which references the generator is updated as needed

</details>

<details><summary><strong>Updating the Python CDK</strong></summary>

### Airbyter

Before merging:
- Pull Request description explains what problem it is solving
- Code change is unit tested
- Build and my-py check pass
- Smoke test the change on at least one affected connector
   - On Github: Run [this workflow](https://github.com/airbytehq/airbyte/actions/workflows/connectors_tests.yml), passing `--use-local-cdk --name=source-<connector>` as options
   - Locally: `airbyte-ci connectors --use-local-cdk --name=source-<connector> test`
- PR is reviewed and approved
      
After merging:
- [Publish the CDK](https://github.com/airbytehq/airbyte/actions/workflows/publish-cdk-command-manually.yml)
   - The CDK does not follow proper semantic versioning. Choose minor if this the change has significant user impact or is a breaking change. Choose patch otherwise.
   - Write a thoughtful changelog message so we know what was updated.
- Merge the platform PR that was auto-created for updating the Connector Builder's CDK version
   - This step is optional if the change does not affect the connector builder or declarative connectors.

</details>
2024-03-08 14:21:46 -08:00
Ella Rohm-Ensing
acbdc2d6e1 Introduce FinalStateCursor to emit state messages at the end of full refresh syncs (#35905)
Co-authored-by: brianjlai <brian.lai@airbyte.io>
2024-03-08 16:58:26 -05:00
Alexandre Girard
4a808ee178 🐛 follow up to #35471: update the cartesian stream slicer (#35865) 2024-03-07 08:20:02 -08:00
Alexandre Girard
f55abc1fdc 🐛 low-code: Fix incremental substreams (#35471) 2024-03-05 18:50:42 -08:00
Alexandre Girard
5f48da9a67 [low-code] allow page size to be defined with string interpolation (#35735)
Co-authored-by: Dan Lecocq <dlecocq@sofi.org>
2024-03-05 16:03:16 -08:00
Ella Rohm-Ensing
a090088594 file cdk: handle scalar values that resolve to None (#35688)
<!--
Thanks for your contribution! 
Before you submit the pull request, 
I'd like to kindly remind you to take a moment and read through our guidelines
to ensure that your contribution aligns with the type of contributions our project accepts.
All the information you need can be found here:
   https://docs.airbyte.com/contributing-to-airbyte/

We truly appreciate your interest in contributing to Airbyte,
and we're excited to see what you have to offer! 

If you have any questions or need any assistance, feel free to reach out in #contributions Slack channel.
-->

## What
* Closes https://github.com/airbytehq/airbyte/issues/34151
* Closes https://github.com/airbytehq/oncall/issues/4386

## How
Handle cases where the python value of a pyarrow scalar is None. This can be due to null values in data, as well as null-like values like `NaT` (similar to `NaN`). We previously handled this for `None` binary types, but now handle this for `None` of any type.

## 🚨 User Impact 🚨
No breaking changes. After this CDK version is released we should update the CDK dependency in S3 and any other file sources that parse parquet


## Pre-merge Actions
*Expand the relevant checklist and delete the others.*

<details><summary><strong>New Connector</strong></summary>

### Community member or Airbyter

- **Community member?** Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run `./gradlew :airbyte-integrations:connectors:<name>:integrationTest`.
- Connector version is set to `0.0.1`
    - `Dockerfile` has version `0.0.1`
- Documentation updated
    - Connector's `README.md`
    - Connector's `bootstrap.md`. See [description and examples](https://docs.google.com/document/d/1ypdgmwmEHWv-TrO4_YOQ7pAJGVrMp5BOkEVh831N260/edit?usp=sharing)
    - `docs/integrations/<source or destination>/<name>.md` including changelog with an entry for the initial version. See changelog [example](https://docs.airbyte.io/integrations/sources/stripe#changelog)
    - `docs/integrations/README.md`

### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Updating a connector</strong></summary>

### Community member or Airbyter

- Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added


### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Connector Generator</strong></summary>

- Issue acceptance criteria met
- PR name follows [PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook)
- If adding a new generator, add it to the [list of scaffold modules being tested](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connector-templates/generator/build.gradle#L41)
- The generator test modules (all connectors with `-scaffold` in their name) have been updated with the latest scaffold by running `./gradlew :airbyte-integrations:connector-templates:generator:generateScaffolds` then checking in your changes
- Documentation which references the generator is updated as needed

</details>

<details><summary><strong>Updating the Python CDK</strong></summary>

### Airbyter

Before merging:
- Pull Request description explains what problem it is solving
- Code change is unit tested
- Build and my-py check pass
- Smoke test the change on at least one affected connector
   - On Github: Run [this workflow](https://github.com/airbytehq/airbyte/actions/workflows/connectors_tests.yml), passing `--use-local-cdk --name=source-<connector>` as options
   - Locally: `airbyte-ci connectors --use-local-cdk --name=source-<connector> test`
- PR is reviewed and approved
      
After merging:
- [Publish the CDK](https://github.com/airbytehq/airbyte/actions/workflows/publish-cdk-command-manually.yml)
   - The CDK does not follow proper semantic versioning. Choose minor if this the change has significant user impact or is a breaking change. Choose patch otherwise.
   - Write a thoughtful changelog message so we know what was updated.
- Merge the platform PR that was auto-created for updating the Connector Builder's CDK version
   - This step is optional if the change does not affect the connector builder or declarative connectors.

</details>
2024-03-05 09:07:02 -08:00
Brian Lai
ef98194673 Emit final state message for full refresh syncs and consolidate read flows (#35622) 2024-03-05 01:05:06 -05:00
Danny Tiesling
e671aa320d 🐛 Source S3: fix exception when setting CSV stream delimiter to \t. (#35246)
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
2024-02-23 14:34:29 -03:00
Artem Inzhyyants
0954ad3d3a Airbyte CDK: add interpolation for request options (#35485)
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2024-02-22 19:40:44 +01:00
Alexandre Girard
5724ca0cf0 Add ignore_stream_slicer_parameters_on_paginated_requests flag (#35462) 2024-02-21 14:14:37 -08:00
Artem Inzhyyants
3355c5c432 Airbyte CDK: add filter to RemoveFields (#35326)
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
2024-02-21 13:49:10 +01:00
Alex Birdsall
385a70d89d Support user-specified test read limits in connector_builder code (#35312) 2024-02-16 15:53:26 -08:00
Brian Lai
2b87164b89 Emit multiple error trace messages and continue syncs by default (#35129) 2024-02-15 02:16:02 -05:00
Alexandre Girard
fc87183905 🐛 python cdk: mask oauth access key (#34931) 2024-02-14 22:25:18 -08:00
Maxime Carbonneau-Leclerc
60a2618154 [ISSUE #34910] add headers to HttpResponse for test framework (#35105) 2024-02-09 12:19:29 -05:00
Catherine Noll
e8910e427a File-based CDK: make incremental syncs concurrent (#34540) 2024-02-07 20:41:04 -05:00
Brian Lai
60686505f3 Revert "Emit multiple error trace messages and continue syncs by default" (#34990) 2024-02-07 19:47:15 -05:00
Maxime Carbonneau-Leclerc
3d9f70f9b0 [ISSUE #34755] do not propagate parameters on InlineSchemaLoader (#34853) 2024-02-07 15:41:03 -05:00
Brian Lai
cc2a6e229f Emit multiple error trace messages and continue syncs by default (#34636) 2024-02-07 13:34:43 -05:00