Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Airbyte Protocol V1 support. #20036

Merged
merged 19 commits into from
Jan 30, 2023

Conversation

gosusnp
Copy link
Contributor

@gosusnp gosusnp commented Dec 2, 2022

What

Enable Airbyte Protocol V1 in the platform.

Closes #16814

How

  • Use the default objects as v1 and the v0 objects for v0 (as expected)
  • Update the config to enable v0 and v1 in the platform

This leverages the fact that v1 doesn't change the structure of v0. However, we won't be fully using v1 until #19240 is merged.
In order to properly use the v1 objects, we need to have a few tasks to decouple Java connectors from the default version of the protocol objects.

Recommended reading order

Any

🚨 User Impact 🚨

Following this change, as expected but worth highlighting, we will be converting all messages v0->v1->v0 for all connectors until they have been migrated to v1.

@gosusnp gosusnp temporarily deployed to more-secrets December 2, 2022 21:03 Inactive

@Override
public Version getCurrentVersion() {
return new Version("1.0.0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to define these versions somewhere in a constants class? Something like PREVIOUS and CURRENT, as well as specific version numbers so that when we want to change, we can just basically update that class (e.g. point CURRENT to a newly added VERSION_X constant). Feels like otherwise we are going to have a few versions of these strings floating around. Not sure exactly how to reduce the duplication, but it feels like centralizing these would help.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those values are tied to migration itself. Currently, we can add V2 that would have a previous v1, current v2.

We currently have

, I could add some constants V0, V1 in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@gosusnp gosusnp temporarily deployed to more-secrets December 2, 2022 21:50 Inactive
@gosusnp gosusnp marked this pull request as ready for review December 2, 2022 22:23
@gosusnp gosusnp requested a review from a team as a code owner December 2, 2022 22:23
Copy link
Contributor

@benmoriceau benmoriceau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll let previous review to approve

@edgao edgao temporarily deployed to more-secrets December 17, 2022 00:18 — with GitHub Actions Inactive
@edgao edgao temporarily deployed to more-secrets December 17, 2022 00:18 — with GitHub Actions Inactive
@edgao edgao temporarily deployed to more-secrets January 6, 2023 18:19 — with GitHub Actions Inactive
@edgao edgao temporarily deployed to more-secrets January 6, 2023 18:19 — with GitHub Actions Inactive
* Updated normalization simple stream processing to handle new datatypes

* Updated normalization nested stream processing to handle new datatypes

* Updated normalization nested stream processing to handle new datatypes

* Updated normalization drop_scd_catalog processing to handle new datatypes

* Updated normalization ephemeral test processing to handle new datatypes

* fixed more tests for normalization

* fixed more tests for normalization

* fixed more tests for normalization

* fixed more tests for normalization

* fixed more issues

* fixed more issues (clickhouse)

* fixed more issues

* fixed more issues

* fixed more issues

* added binary type processing for some DBs

* cleared commented code and moved some hardcodes to processing as macro

* fixed codestyle and cleared commented code

* minor refactor

* minor refactor

* minor refactor

* fixed bool cast error

* fixed dict->str cast error

* fixed is_combining_node cast py check

* removed commented code

* removed commented code

* committed autogenerated normalization_test_output files

* committed autogenerated normalization_test_output files (new files)

* refactored utils.py

* Updated utils.py to use Callable functions and get rid of property_type in is_number and is_bool functions

* committed autogenerated normalization_test_output files (new files)

* fixed typo in TIMESTAMP_WITH_TIMEZONE_TYPE

* updated stream_processor to handle string type first as a wider type

* fixed arrays normalization by updating is_simple_property method as per new approaches

* format

Co-authored-by: Edward Gao <edward.gao@airbyte.io>
@edgao edgao requested a review from a team as a code owner January 6, 2023 21:26
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2023

Affected Connector Report

NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:

  • Run integration tests
  • Bump connector or module version
  • Add changelog
  • Publish the new version

✅ Sources (25)

Connector Version Changelog Publish
source-alloydb 1.0.36
source-alloydb-strict-encrypt 1.0.36 🔵
(ignored)
🔵
(ignored)
source-bigquery 0.2.3
source-clickhouse 0.1.15
source-clickhouse-strict-encrypt 0.1.15 🔵
(ignored)
🔵
(ignored)
source-cockroachdb 0.1.19
source-cockroachdb-strict-encrypt 0.1.19 🔵
(ignored)
🔵
(ignored)
source-db2 0.1.17
source-db2-strict-encrypt 0.1.17 🔵
(ignored)
🔵
(ignored)
source-dynamodb 0.1.0
source-jdbc 0.3.5 🔵
(ignored)
🔵
(ignored)
source-mongodb-strict-encrypt 0.1.19 🔵
(ignored)
🔵
(ignored)
source-mongodb-v2 0.1.19
source-mssql 0.4.28
source-mssql-strict-encrypt 0.4.28 🔵
(ignored)
🔵
(ignored)
source-mysql 1.0.21
source-mysql-strict-encrypt 1.0.21 🔵
(ignored)
🔵
(ignored)
source-oracle 0.3.22
source-oracle-strict-encrypt 0.3.22 🔵
(ignored)
🔵
(ignored)
source-postgres 1.0.42
source-postgres-strict-encrypt 1.0.42 🔵
(ignored)
🔵
(ignored)
source-redshift 0.3.16
source-scaffold-java-jdbc 0.1.0 🔵
(ignored)
🔵
(ignored)
source-snowflake 0.1.29
source-tidb 0.2.2
  • See "Actionable Items" below for how to resolve warnings and errors.

❌ Destinations (16)

Connector Version Changelog Publish
destination-bigquery 1.2.13
destination-bigquery-denormalized 1.2.12
(diff seed version)
destination-clickhouse 0.2.2
(changelog missing)
destination-clickhouse-strict-encrypt 0.2.2 🔵
(ignored)
🔵
(ignored)
destination-jdbc 0.3.14 🔵
(ignored)
🔵
(ignored)
destination-mssql 0.1.22
destination-mssql-strict-encrypt 0.1.22 🔵
(ignored)
🔵
(ignored)
destination-mysql 0.1.20
destination-mysql-strict-encrypt 0.1.21
(mismatch: 0.1.20)
🔵
(ignored)
🔵
(ignored)
destination-oracle 0.1.19
destination-oracle-strict-encrypt 0.1.19 🔵
(ignored)
🔵
(ignored)
destination-postgres 0.3.26
destination-postgres-strict-encrypt 0.3.26 🔵
(ignored)
🔵
(ignored)
destination-redshift 0.3.56
destination-snowflake 0.4.46
destination-tidb 0.1.0
  • See "Actionable Items" below for how to resolve warnings and errors.

👀 Other Modules (1)

  • base-normalization

Actionable Items

(click to expand)

Category Status Actionable Item
Version
mismatch
The version of the connector is different from its normal variant. Please bump the version of the connector.

doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
Changelog
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.

changelog missing
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog.
Publish
not in seed
The connector is not in the seed file (e.g. source_definitions.yaml), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug.

diff seed version
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version.

@gosusnp gosusnp temporarily deployed to more-secrets January 25, 2023 00:44 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jan 25, 2023

Platform Test Results

   240 files  +  6     240 suites  +6   25m 38s ⏱️ +53s
1 649 tests +34  1 638 ✔️ +34  11 💤 ±0  0 ±0 
1 669 runs  +34  1 658 ✔️ +34  11 💤 ±0  0 ±0 

Results for commit 8889370. ± Comparison against base commit b0a81ba.

♻️ This comment has been updated with latest results.

@gosusnp gosusnp temporarily deployed to more-secrets January 26, 2023 19:47 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 26, 2023 19:47 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 26, 2023 22:46 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 26, 2023 22:46 — with GitHub Actions Inactive
* On the fly catalog migration for normalization activity

* On the fly catalog migration for job persistence

* On the fly migration for standard sync persistence

* On the fly migration for airbyte catalogs

* Refactor code to share JsonSchema traversal

* Add V0 Data type search function

* PMD and Format

* Fix getOrInsertActorCatalog and ConfigRepositoryE2E tests

* Null-proofing CatalogMigrationV1Helper

* More null checks

* Fix test

* Format

* Add data type v1 support to the FE

* Changes AC test check to check exited ps (#21672)

some docker compose changes no longer show exited
processes.  this broke out test

this change should fix master

tested in a runner that failed

* Move wellknown types mapping to the utility function

* use protocolv1 normalization

---------

Co-authored-by: Topher Lubaway <asimplechris@gmail.com>
Co-authored-by: Edward Gao <edward.gao@airbyte.io>
@octavia-squidington-iv octavia-squidington-iv added the area/frontend Related to the Airbyte webapp label Jan 27, 2023
@gosusnp gosusnp temporarily deployed to more-secrets January 27, 2023 18:20 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 27, 2023 18:20 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2023

@gosusnp gosusnp temporarily deployed to more-secrets January 27, 2023 19:34 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 27, 2023 19:34 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 27, 2023 19:35 — with GitHub Actions Inactive
@edgao edgao temporarily deployed to more-secrets January 30, 2023 16:13 — with GitHub Actions Inactive
@edgao edgao temporarily deployed to more-secrets January 30, 2023 16:13 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 30, 2023 16:32 — with GitHub Actions Inactive
@gosusnp gosusnp temporarily deployed to more-secrets January 30, 2023 16:32 — with GitHub Actions Inactive
@gosusnp gosusnp merged commit 6660b13 into master Jan 30, 2023
@gosusnp gosusnp deleted the gosusnp/platform-use-protocol-v1-the-quick-way branch January 30, 2023 18:17
edgao added a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation area/frontend Related to the Airbyte webapp area/platform issues related to the platform area/protocol area/server area/worker Related to worker connectors/source/relational-db normalization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Airbyte Protocol v1
7 participants