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

Destinations V2: clean up AirbyteType code #28430

Merged
merged 10 commits into from
Jul 20, 2023

Conversation

cynthiaxyin
Copy link
Contributor

@cynthiaxyin cynthiaxyin commented Jul 18, 2023

closes #28054

Recommended reading order:

  • Work is broken down and labeled commit by commit!

@octavia-squidington-iii octavia-squidington-iii added the area/connectors Connector related issues label Jul 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan and you've followed all steps in the Breaking Changes Checklist
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • The connector tests are passing in CI
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@cynthiaxyin cynthiaxyin force-pushed the cynthia/airbyte_type_cleanup branch 8 times, most recently from 8e8fbd4 to a61cc28 Compare July 19, 2023 16:43
@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jul 19, 2023
if (!foundExcludedTypes) {
return protocolType;
// Picks which type in a Union takes precedence
public static AirbyteType chooseUnionType(final Union u) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

much simpler and easier to read than before :)

@cynthiaxyin cynthiaxyin marked this pull request as ready for review July 19, 2023 18:31
@cynthiaxyin cynthiaxyin requested a review from a team as a code owner July 19, 2023 18:31
@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

Copy link
Contributor

@edgao edgao left a comment

Choose a reason for hiding this comment

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

had a few comments but nothing blocking. I'd weakly like to completely kill the AirbyteTypeUtils class and have those two methods both live inside AirbyteType.java, but only very weakly.

@cynthiaxyin cynthiaxyin force-pushed the cynthia/airbyte_type_cleanup branch 3 times, most recently from 5b137da to 45722bb Compare July 20, 2023 01:25
@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@cynthiaxyin cynthiaxyin enabled auto-merge (squash) July 20, 2023 06:53
@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii

This comment was marked as outdated.

@octavia-squidington-iii
Copy link
Collaborator

destination-bigquery test report (commit ae42899a1b) - ✅

⏲️ Total pipeline duration: 24mn44s

Step Result
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
./gradlew :airbyte-integrations:connectors:destination-bigquery:integrationTest

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@octavia-squidington-iii
Copy link
Collaborator

destination-bigquery-denormalized test report (commit ae42899a1b) - ✅

⏲️ Total pipeline duration: 25.97s

Step Result
Validate airbyte-integrations/connectors/destination-bigquery-denormalized/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-bigquery-denormalized docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-bigquery-denormalized:integrationTest

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery-denormalized test

@cynthiaxyin cynthiaxyin merged commit 7e4797d into master Jul 20, 2023
15 checks passed
@cynthiaxyin cynthiaxyin deleted the cynthia/airbyte_type_cleanup branch July 20, 2023 20:59
efimmatytsin pushed a commit to scentbird/airbyte that referenced this pull request Jul 27, 2023
* general cleanup - move stuff around, add more comments

* guarantee `getAirbyteProtocolType` won't handle array values for `type`

* rename OneOf to Union

* simplify union ordering logic

* update testChooseUnion

* fix docs typos

* Automated Commit - Format and Process Resources Changes

* address comments

* Automated Commit - Format and Process Resources Changes

---------

Co-authored-by: cynthiaxyin <cynthiaxyin@users.noreply.github.com>
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 connectors/destination/bigquery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1s1t: cleanup+refactoring in AirbyteType/Utils
3 participants