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 Oracle: maxStringLength should be 128 #6611

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

VitaliiMaltsev
Copy link
Contributor

@VitaliiMaltsev VitaliiMaltsev commented Oct 1, 2021

What

While doing Normalisation on Destination-Oracle, the underlying OracleNameTransformer.java class truncates the table names up to 30 symbols, which breaks the normalisation strategy for this destinations, because the max allowed length for table names is 128.

Expected behaviour: Normalisation is done correctly.

How

the existing OracleContainer does not work correctly with all versions of docker images.
Therefore, a custom OracleContainer was made

Recommended reading order

  1. x.java
  2. y.python

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/SUMMARY.md
    • 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
  • Connector added to connector index like described here

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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command 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
  • Connector version bumped like described here

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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub 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.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vmaltsev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the area/connectors Connector related issues label Oct 1, 2021
@marcosmarxm
Copy link
Member

There is an Oracle AWS instance for tests, any specific reason to use a container?

@VitaliiMaltsev VitaliiMaltsev changed the title bug Destination Oracle: maxStringLength should be 128 🐛 Destination Oracle: maxStringLength should be 128 Oct 1, 2021
@VitaliiMaltsev
Copy link
Contributor Author

There is an Oracle AWS instance for tests, any specific reason to use a container?

according to the task #5811, it is necessary to rewrite the integration tests for jdbc connectors with containers approach

@VitaliiMaltsev VitaliiMaltsev requested a review from tuliren October 1, 2021 15:55
@@ -41,7 +41,7 @@ public String convertStreamName(String input) {
}
// prior to Oracle version 12.2, identifiers are not allowed to exceed 30 characters in length.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment explains why identifiers are truncated to 30 characters. If we make this change, all existing users running an Oracle server prior to 12.2 cannot upgrade their connectors in the future. @sherifnada, do we have a convention about this type of thing?

Copy link
Member

Choose a reason for hiding this comment

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

Liren, I already change to 128. This is required to run normalization.

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcosmarxm, ok, I will approve the PR. But will this prevent existing users to upgrade?

Copy link
Contributor

Choose a reason for hiding this comment

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

is this going to require existing users to do anything? Did we already support 12.2+ and just didn't advertise it? if so this change is safe.

Copy link
Contributor Author

@VitaliiMaltsev VitaliiMaltsev Oct 4, 2021

Choose a reason for hiding this comment

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

is this going to require existing users to do anything? Did we already support 12.2+ and just didn't advertise it? if so this change is safe.

I unfortunately have no information about the version of Oracle, which was supported before. We have several options for this task :
a) just add to the documentation that we only support version 12.2+
b) additional implementation is needed so that the user himself enters the version of the database on UI and further processing starts with this data, but in this case it is does not solve the problem with normalization (currently it works only with 128 characters for any Oracle version).
What do you think about it?

Copy link
Contributor

@sherifnada sherifnada Oct 6, 2021

Choose a reason for hiding this comment

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

@tuliren
Copy link
Contributor

tuliren commented Oct 1, 2021

@VitaliiMaltsev, can you sign the CLA?

@bazarnov bazarnov linked an issue Oct 2, 2021 that may be closed by this pull request
@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Oct 4, 2021

@VitaliiMaltsev, can you sign the CLA?

@tuliren i have already signed in, but licence/cla is still in pending state
cla

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Oct 6, 2021
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets October 6, 2021 09:32 Inactive
@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Oct 6, 2021

/publish connector=connectors/destination-oracle

🕑 connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1311283576
✅ connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1311283576

@jrhizor jrhizor temporarily deployed to more-secrets October 6, 2021 09:35 Inactive
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets October 6, 2021 10:19 Inactive
@VitaliiMaltsev VitaliiMaltsev merged commit 6e53a57 into master Oct 6, 2021
@VitaliiMaltsev VitaliiMaltsev deleted the vmaltsev/oracle-container branch October 6, 2021 10:50
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* revert back to 128 characters in OracleNameTransformer | Create Custom OracleContainer

* update to 0.1.9

Co-authored-by: vmaltsev <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Destination Oracle: maxStringLength should be 128
8 participants