Skip to content

🐛 Source MySQL: Value '65535' is outside valid range for type - #7559

Merged
Alexander Tsukanov (alexandertsukanov) merged 6 commits into
masterfrom
otsukanov/5842_Mysql_Value_65535_is_outside_of_valid_range
Nov 4, 2021
Merged

Alexander Tsukanov (alexandertsukanov) merged 6 commits into
masterfrom
otsukanov/5842_Mysql_Value_65535_is_outside_of_valid_range

Conversation

@alexandertsukanov

@alexandertsukanov Alexander Tsukanov (alexandertsukanov) commented Nov 2, 2021 •

Copy link
Copy Markdown
Contributor

What

In some sources, Short might have a value larger than Short max value. E.q. MySQL has an unsigned smallint type, which can contain value 65535. If we fail to cast a Short value, we will try to cast Integer.

How

Handle the case, when assignment to Short value is not possible and cast to Integer in such case.

Recommended reading order

  1. x.java

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 for both insecure and encrypted connector

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.

@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 2, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1412242314
✅ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1412242314
No Python unittests run

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 2, 2021 12:28 Inactive
@alexandertsukanov Alexander Tsukanov (alexandertsukanov) changed the title Source MySQL: Value '65535' is outside valid range for type 🐛 Source MySQL: Value '65535' is outside valid range for type Nov 2, 2021
@github-actions github-actions Bot added the area/documentation Improvements or additions to documentation label Nov 2, 2021
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 2, 2021 15:04 Inactive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. we can proceed with publishing and merging without airbyte review

@alexandr-shegeda

Copy link
Copy Markdown
Contributor

please, run test for the encrypted version as well

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 10:09 Inactive
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 3, 2021 10:45 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 10:47 Inactive
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 3, 2021 11:21 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 11:28 Inactive
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql-strict-encrypt

🕑 connectors/source-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1416572665
✅ connectors/source-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1416572665
No Python unittests run

@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 3, 2021 11:53 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 11:55 Inactive
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) marked this pull request as ready for review November 3, 2021 12:19
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) force-pushed the otsukanov/5842_Mysql_Value_65535_is_outside_of_valid_range branch from 07b2b85 to 413f387 Compare November 3, 2021 14:14
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417130184
❌ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417130184
🐛 https://gradle.com/s/ii2ibo6ajh3pq

@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 3, 2021 14:16 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 14:18 Inactive
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417289182
❌ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417289182
🐛 https://gradle.com/s/d7a3w6fbmwilc

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 14:55 Inactive
@davinchia
Davin Chia (davinchia) temporarily deployed to more-secrets November 3, 2021 15:26 Inactive
@davinchia

Davin Chia (davinchia) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417431990
❌ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1417431990
🐛 https://gradle.com/s/inybkxbgqpuw4

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 15:29 Inactive
Comment thread docs/integrations/sources/mysql.md Outdated
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) force-pushed the otsukanov/5842_Mysql_Value_65535_is_outside_of_valid_range branch from 9285cc6 to 413f387 Compare November 4, 2021 08:33
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 4, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1420447524
✅ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1420447524
No Python unittests run

@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) temporarily deployed to more-secrets November 4, 2021 08:36 Inactive
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 4, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-mysql-strict-encrypt

🕑 connectors/source-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1420448683
✅ connectors/source-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1420448683
No Python unittests run

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 4, 2021 08:39 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 4, 2021 08:39 Inactive
@alexandertsukanov

Alexander Tsukanov (alexandertsukanov) commented Nov 4, 2021 •

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1420568852
✅ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/1420568852

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 4, 2021 09:15 Inactive
@alexandertsukanov
Alexander Tsukanov (alexandertsukanov) deleted the otsukanov/5842_Mysql_Value_65535_is_outside_of_valid_range branch November 4, 2021 10:18
Konrad Schlatte (schlattk) pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…ehq#7559)

* BUG-5842: Mysql Value '65535' is outside valid range for type java.lang.Short

* BUG-5842: Bumped versions of connector.

* BUG-5842: Fixed unit-test for mysql-encrypt

* Update docs/integrations/sources/mysql.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

This branch was previously deployed

1 inactive deployment
more-secrets — 3c837563 Deployed Nov 4, 2021 by jrhizor
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 gl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source Mysql Value '65535' is outside of valid range for type java.lang.Short

5 participants