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

🎉 Source Cockroachdb: Added new source for Cockroachdb #4382

Merged
merged 25 commits into from
Jul 1, 2021

Conversation

etsybaev
Copy link
Contributor

@etsybaev etsybaev commented Jun 28, 2021

What

Added CockroachDB source connector.

How

Added CockroachDB source connector.
Some of data type returns wrong values, but those issues are same for all of DB. A follow-up ticket's been created #4408

Pre-merge Checklist

Expand the checklist which is relevant for this PR.

Connector checklist

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • Secrets are annotated with airbyte_secret in the connector's spec
  • Credentials added to Github CI if needed and not already present. instructions for injecting secrets into CI.
  • Unit & integration tests added as appropriate (and are passing)
    • Community members: please provide proof of this succeeding locally e.g: screenshot or copy-paste 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.
  • /test connector=connectors/<name> command as documented here is passing.
    • Community members can skip this, Airbyters will run this for you.
  • Code reviews completed
  • Documentation updated
    • README.md
    • docs/SUMMARY.md if it's a new connector
    • Created or updated reference docs in docs/integrations/<source or destination>/<name>.
    • Changelog in the appropriate page in docs/integrations/.... See changelog example
    • docs/integrations/README.md contains a reference to the new connector
    • Build status added to build page
  • Build is successful
  • Connector version bumped like described here
  • New Connector version released on Dockerhub by running the /publish command described here
  • No major blockers
  • PR merged into master branch
  • Follow up tickets have been created
  • Associated tickets have been closed & stakeholders notified

Connector Generator checklist

  • 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.

Selection_191
Selection_190
Selection_189
Selection_188
Selection_187
Selection_186

@github-actions github-actions bot added the area/connectors Connector related issues label Jun 28, 2021
@etsybaev etsybaev linked an issue Jun 30, 2021 that may be closed by this pull request
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jun 30, 2021
@etsybaev
Copy link
Contributor Author

etsybaev commented Jun 30, 2021

/test connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/986513547
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/986513547

@etsybaev etsybaev marked this pull request as ready for review June 30, 2021 13:48
airbyte-integrations/connectors/source-jdbc/build.gradle Outdated Show resolved Hide resolved
@@ -786,7 +787,7 @@ private ConfiguredAirbyteCatalog getConfiguredCatalogWithOneStream(final String
return catalog;
}

private AirbyteCatalog getCatalog(final String defaultNamespace) {
protected AirbyteCatalog getCatalog(final String defaultNamespace) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why are these changed to protected? we should keep private unless required to change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to override it in CockroachDbJdbcSourceAcceptanceTest. Basic Catalog contains a case with the table without PK meanwhile the Cockroach DB is not supposed to have a tables without PK. If you do not set it explicitly - it will anyway automatically add additionally.

| `timestamp without timezone` | string | may be written as a native date type depending on the destination |
| `uuid` | string | |

**Note:** arrays for all the above types as well as custom types are supported, although they may be de-nested depending on the destination. Byte arrays are currently unsupported.
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens to byte arrays? does the connector just break?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, I copy-pasted the template from the postgres source and probably missed to clean this Note. Byte arrays also works, added additional test for it to comprehensive tests. Thanks

docs/integrations/sources/cockroachdb.md Outdated Show resolved Hide resolved
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

LGTM -- can you make sure to update all the docs mentioned in the checklist? some of them are not updated

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/test connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/990777808
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/990777808

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/test connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/990852333
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/990852333

ievgeniit added 2 commits July 1, 2021 20:10
@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/test connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991031156
❌ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991031156
🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991031156
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991031156

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/publish connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991072128
❌ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991072128

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/publish connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991083937
❌ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991083937

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/test connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991176782
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991176782

@etsybaev
Copy link
Contributor Author

etsybaev commented Jul 1, 2021

/publish connector=connectors/source-cockroachdb

🕑 connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991198651
✅ connectors/source-cockroachdb https://github.com/airbytehq/airbyte/actions/runs/991198651

@etsybaev etsybaev merged commit 4399656 into master Jul 1, 2021
@etsybaev etsybaev deleted the etsybaev/1705-cockroachdb-source branch July 1, 2021 19:04
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/source/cockroachdb connectors/sources-database
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CockroachDB as a new source connector
4 participants