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

GA destinations: remove supportsDbt and supportsNormalization from spec.json #21306

Closed

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Jan 12, 2023

What

Issue: https://github.com/airbytehq/airbyte-internal-issues/issues/2539
The source of truth for supportsDbt and supportsNormalization is now in the destination definition.
We should remove it from the destination spec.
This PR is doing it for GA destinations.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 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 (0)

Connector Version Changelog Publish
  • See "Actionable Items" below for how to resolve warnings and errors.

❌ Destinations (6)

Connector Version Changelog Publish
destination-bigquery 2.0.0
(diff seed version)
destination-bigquery-denormalized 1.2.10
destination-databricks 0.3.1
destination-s3 1.0.0
destination-s3-glue 0.1.1
destination-snowflake 1.0.0
(diff seed version)
  • 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.

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 12, 2023

/test connector=connectors/destination-bigquery

🕑 connectors/destination-bigquery https://github.com/airbytehq/airbyte/actions/runs/3903098782
✅ connectors/destination-bigquery https://github.com/airbytehq/airbyte/actions/runs/3903098782
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 14      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    14      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     166      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         189     48    75%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 595    400    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1441    629    56%

Build Passed

Test summary info:

All Passed

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 12, 2023

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3903099758
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3903099758
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 14      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    14      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     166      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         189     48    75%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 595    400    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1441    629    56%

Build Passed

Test summary info:

All Passed

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 12, 2023

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/3903100803
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/3903100803
No Python unittests run

Build Passed

Test summary info:

All Passed

@alafanechere alafanechere marked this pull request as ready for review January 12, 2023 14:19
@alafanechere alafanechere requested review from a team January 12, 2023 14:20
@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 12, 2023

NB: I don't think it's safe to merge until cloud is deployed with OSS >= 0.43.18

Copy link
Contributor

@evantahler evantahler left a comment

Choose a reason for hiding this comment

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

Nice!

  • Major version bump (semver!)
  • Docs explain why & what version of the platform is needed
  • connector tests all pass

@alafanechere
Copy link
Contributor Author

Cloud is now on >= 0.43.18.

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 13, 2023

/publish connector=connectors/destination-bigquery

🕑 Publishing the following connectors:
connectors/destination-bigquery
https://github.com/airbytehq/airbyte/actions/runs/3909580355


Connector Did it publish? Were definitions generated?
connectors/destination-bigquery

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 13, 2023

/publish connector=connectors/destination-s3

🕑 Publishing the following connectors:
connectors/destination-s3
https://github.com/airbytehq/airbyte/actions/runs/3909581722


Connector Did it publish? Were definitions generated?
connectors/destination-s3

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 13, 2023

/publish connector=connectors/destination-snowflake

🕑 Publishing the following connectors:
connectors/destination-snowflake
https://github.com/airbytehq/airbyte/actions/runs/3909584680


Connector Did it publish? Were definitions generated?
connectors/destination-snowflake

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@alafanechere
Copy link
Contributor Author

alafanechere commented Jan 13, 2023

@airbytehq/use please checkout the changelog.
This will probably make these connectors not work on OSS versions <= 0.43.18.
Feel free to organize a community outreach.

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 13, 2023 09:07 — with GitHub Actions Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 13, 2023 09:07 — with GitHub Actions Inactive
@alafanechere
Copy link
Contributor Author

@evantahler I realize that even if we remove these fields from spec.json they will still be outputted with their protocol default value because Java connectors rely on protocol models to output the spec. It explains why java sources also have these fields set by default.

The BaseConnector.spec() outputs a ConnectorSpecification objects built from the protocol model. So supportsNormalization and supportsDbt default to false and will be present in the spec command output.
Because of Java strict typing and how spec command is implemented I don't think we can easily alter this behavior.
I believe we'll have to make the connector-specific changes in the protocol change PR. #21295

@alafanechere
Copy link
Contributor Author

So the only benefit from the current PR would be confirming the platform 💯 relies on definitions to manage connector normalization. But I'm not sure it's worth the confusion of releasing connectors with supportsNormalization = false in the spec output.

@alafanechere
Copy link
Contributor Author

@davydov-d let me know once you created the OAuth parameters on the Cloud DB and I'll approve the PR so that we can merge it tommorow.

@davydov-d
Copy link
Collaborator

@davydov-d let me know once you created the OAuth parameters on the Cloud DB and I'll approve the PR so that we can merge it tommorow.

@alafanechere done

@alafanechere
Copy link
Contributor Author

Hey @grishick do you mind if I merge these? It will lead to misleading spec outputs according to what I explained here. I'd understand if you preferred to hold these changes until the protocol update.

@grishick
Copy link
Contributor

Hey @grishick do you mind if I merge these? It will lead to misleading spec outputs according to what I explained here. I'd understand if you preferred to hold these changes until the protocol update.

I am confused as to how these changes affect the destinations. From the comment that you linked is sounds like if you merge this PR, normalization will be disabled for BigQuery and Snowflake destinations, which is not good.

@alafanechere
Copy link
Contributor Author

is sounds like if you merge this PR, normalization will be disabled for BigQuery and Snowflake destinations, which is not good.

We now pull the information about the normalization / dbt support from the connector definition, so the connector spec is not used by the platform to determine if normlization is supported. So merging this PR should not break anything. My concern is that the spec output is going to be misleading: as the we remove these field from these connector spec their value will fallback to the default defined in the protocol model. So running spec on BigQuery will output supportsNormalization: false which is not great.
We can hold until the protocol change.

@grishick
Copy link
Contributor

So running spec on BigQuery will output supportsNormalization: false which is not great.

This seems dangerous.

Another question. If I am adding a new connector with normalization support - how do I do that without breaking the CI? I cannot add the connector to destination_definitions.yaml or destination_specs.yaml before I publish it, because the CI will complain about a missing Docker image. All integration tests that use normalization will be skipped for this connector, because it has no way of declaring that it supports normalization outside of the seed files.

@alafanechere
Copy link
Contributor Author

Closing to wait for the protocol update tracked here or the decoupling of java connectors from protocol models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants