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

Destination ClickHouse: remove tcp port spec parameter #16970

Closed
wants to merge 11 commits into from

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Sep 21, 2022

What

ClickHouse configuration in Airbyte requires both HTTP and Native port to be specified.
The HTTP port is used for JDBC driver to communicate with ClickHouse, the native port is used by dbt-clickhouse during transformation step.
The native port is not a requirement for DBT-clickhouse anymore since the last the last versions of dbt-clickhouse support both HTTP and native protocols. We want to switch to HTTP by default everywhere since it reduces the technical complexity of the integration.

How

This PR removes requirements for Native port to be provided to reduce the configuration size and improve UX. I removed all the mentions of TCP port in the codebase introduced in #9340 and #14783

Recommended reading order

  1. *.yml files
  2. the rest

🚨 User Impact 🚨

The number of required fields in ClickHouse configuration was reduced. I didn't manage to run Airbyte locally (neither master branch nor the current one) to take a screenshot. In short, it should remove native port field:
2022-09-21_14-53-46

SUB_BUILD=PLATFORM ./gradlew build fails with

DockerProcessFactoryTest > testEnvMapSet() FAILED
    io.airbyte.workers.exception.WorkerException: Could not find image: busybox

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • 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.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions

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.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here
Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • 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.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

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.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here
Connector Generator
  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • 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:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@CLAassistant
Copy link

CLAassistant commented Sep 21, 2022

CLA assistant check
All committers have signed the CLA.

@sajarin sajarin added internal and removed bounty labels Sep 21, 2022
@marcosmarxm
Copy link
Member

Thanks for the contribution @mshustov someone from the team will review it later this week or next one.

@marcosmarxm marcosmarxm changed the title Reduce ClickHouse connector configuration size Destination ClickHouse: remove tcp port spec parameter Sep 22, 2022
Copy link
Contributor

@grishick grishick left a comment

Choose a reason for hiding this comment

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

LGTM.
@mshustov There are several small things that need to happen before this PR can be published and merged:

  • update version in Dockerfile in destination-clickhouse and destination-clickhouse-strict-encrypt to 0.2.0
  • add a line to the change log in clickhouse.md
  • remove changes from YAML files in seed folder (these will be updated by publish command)

@marcosmarxm
Copy link
Member

Thanks for the review @grishick! @mshustov let me know if you need help with Greg's comment.

@mshustov
Copy link
Contributor Author

mshustov commented Sep 27, 2022

There are several small things that need to happen before this PR can be published and merged:

  • update version in Dockerfile in destination-clickhouse and destination-clickhouse-strict-encrypt to 0.2.0
  • add a line to the change log in clickhouse.md
  • remove changes from YAML files in seed folder (these will be updated by publish command)

@marcosmarxm @grishick done!

@grishick
Copy link
Contributor

grishick commented Sep 30, 2022

/test connector=connectors/destination-clickhouse

🕑 connectors/destination-clickhouse https://github.com/airbytehq/airbyte/actions/runs/3161792278
❌ connectors/destination-clickhouse https://github.com/airbytehq/airbyte/actions/runs/3161792278
🐛 https://gradle.com/s/hme647rtdurik

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_transform_config.py::TestTransformConfig::test_transform_clickhouse
	 �[31m======================== �[31m�[1m1 failed�[0m, �[32m183 passed�[0m�[31m in 2.28s�[0m�[31m =========================�[0m

@grishick grishick mentioned this pull request Sep 30, 2022
37 tasks
@grishick
Copy link
Contributor

I think there is one more change that is needed here to fix the failing unit test. I'll am testing the theory here: #17483

@grishick
Copy link
Contributor

grishick commented Oct 1, 2022

I ended up adding two more changes to fix the normalization tests, publishing the new versions and merging these changes in this pr. I

@grishick grishick closed this Oct 1, 2022
@mshustov mshustov deleted the clicklhouse-polishing branch October 3, 2022 06:51
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