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 Zoho CRM: Set airbyte type to string for zoho autonumbers when they include prefix or suffix #23818 #24034

Merged
merged 9 commits into from
Mar 15, 2023

Conversation

marcosmarxm
Copy link
Member

@marcosmarxm marcosmarxm commented Mar 14, 2023

What

This pull request publish the code of #23818 because I don't access to the user branch and there are some changes to make integration tests to work with Zoho CRM connector I'm finishing the work here.

How

Describe the solution

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.

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

geclos and others added 2 commits March 7, 2023 11:52
Zoho connector assumes any autonumber data type maps to airbyte's
big_integer. But that is not true as in Zoho you can create incremental
fields with strings in them via the prefix/suffix config params. Taking
this into account we choose string format in case prefix and suffix are
not empty.
@marcosmarxm
Copy link
Member Author

marcosmarxm commented Mar 14, 2023

/test connector=connectors/source-zoho-crm

🕑 connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4410768833
❌ connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4410768833
🐛 https://gradle.com/s/i2dfpzjfqphpe

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_types.py::test_field_schema[string-autonumber-512-None-Field-pick_list_values25-autonumber25-expected_values25]
	 FAILED unit_tests/test_types.py::test_field_schema[string-autonumber-512-None-Field-pick_list_values26-None-expected_values26]
	 �[31m================== �[31m�[1m2 failed�[0m, �[32m63 passed�[0m, �[33m43 warnings�[0m�[31m in 0.84s�[0m�[31m ===================�[0m

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/zoho-crm labels Mar 14, 2023
@marcosmarxm
Copy link
Member Author

marcosmarxm commented Mar 14, 2023

/test connector=connectors/source-zoho-crm

🕑 connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4410867359
❌ connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4410867359
🐛 https://gradle.com/s/spz6rdtiomxqm

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestSpec::test_property_type_is_not_array[inputs0] - Fai...
FAILED test_core.py::TestSpec::test_additional_properties_is_true[inputs0] - ...
FAILED test_core.py::TestConnection::test_check[inputs0] - AssertionError: as...
FAILED test_core.py::TestDiscovery::test_discover[inputs0] - docker.errors.Co...
FAILED test_core.py::TestBasicRead::test_airbyte_trace_message_on_failure[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_cursors_exist_in_schema[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_refs_exist_in_schema[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_keyword_exist_in_schema[inputs0-allOf]
ERROR test_core.py::TestDiscovery::test_defined_keyword_exist_in_schema[inputs0-not]
ERROR test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
ERROR test_core.py::TestDiscovery::test_streams_has_sync_modes[inputs0] - doc...
ERROR test_core.py::TestDiscovery::test_additional_properties_is_true[inputs0]
ERROR test_core.py::TestDiscovery::test_backward_compatibility[inputs0] - doc...
ERROR test_core.py::TestBasicRead::test_read[inputs0] - docker.errors.Contain...
ERROR test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
ERROR test_incremental.py::TestIncremental::test_two_sequential_reads[inputs0]
ERROR test_incremental.py::TestIncremental::test_read_sequential_slices[inputs0]
ERROR test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
======= 5 failed, 18 passed, 1 skipped, 37 warnings, 13 errors in 34.25s =======

> Task :airbyte-integrations:connectors:source-zoho-crm:connectorAcceptanceTest FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 9 executed, 18 up-to-date

Publishing build scan...
https://gradle.com/s/spz6rdtiomxqm

S3 cache writes: 1, elapsed: 808ms, sent to cache: 448 B

@marcosmarxm
Copy link
Member Author

marcosmarxm commented Mar 14, 2023

/test connector=connectors/source-zoho-crm

🕑 connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4417805325
❌ connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4417805325
🐛 https://gradle.com/s/vhsljq5zcmkpk

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestConnection::test_check[inputs0] - AssertionError: as...
FAILED test_core.py::TestDiscovery::test_discover[inputs0] - docker.errors.Co...
FAILED test_core.py::TestBasicRead::test_read[inputs0] - docker.errors.Contai...
FAILED test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
FAILED test_incremental.py::TestIncremental::test_two_sequential_reads[inputs0]
FAILED test_incremental.py::TestIncremental::test_read_sequential_slices[inputs0]
FAILED test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_cursors_exist_in_schema[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:109: Backward compatibility tests are disabled for version 0.1.0.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:518: Backward compatibility tests are disabled for version 0.1.0.
======== 7 failed, 27 passed, 2 skipped, 37 warnings, 1 error in 32.51s ========

@marcosmarxm
Copy link
Member Author

marcosmarxm commented Mar 14, 2023

/test connector=connectors/source-zoho-crm

🕑 connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4420481608
✅ connectors/source-zoho-crm https://github.com/airbytehq/airbyte/actions/runs/4420481608
Python tests coverage:

Name                            Stmts   Miss  Cover
---------------------------------------------------
source_zoho_crm/exceptions.py       4      0   100%
source_zoho_crm/__init__.py         2      0   100%
source_zoho_crm/types.py          179     10    94%
source_zoho_crm/api.py             54      4    93%
source_zoho_crm/auth.py            17      2    88%
source_zoho_crm/source.py          14      5    64%
source_zoho_crm/streams.py        109     43    61%
---------------------------------------------------
TOTAL                             379     64    83%
Name                            Stmts   Miss  Cover
---------------------------------------------------
source_zoho_crm/exceptions.py       4      0   100%
source_zoho_crm/__init__.py         2      0   100%
source_zoho_crm/types.py          179      7    96%
source_zoho_crm/auth.py            17      2    88%
source_zoho_crm/api.py             54      8    85%
source_zoho_crm/streams.py        109     27    75%
source_zoho_crm/source.py          14      5    64%
---------------------------------------------------
TOTAL                             379     49    87%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:109: Backward compatibility tests are disabled for version 0.1.0.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:518: Backward compatibility tests are disabled for version 0.1.0.
============ 35 passed, 2 skipped, 37 warnings in 262.59s (0:04:22) ============

@marcosmarxm
Copy link
Member Author

marcosmarxm commented Mar 15, 2023

/publish connector=connectors/source-zoho-crm

🕑 Publishing the following connectors:
connectors/source-zoho-crm
https://github.com/airbytehq/airbyte/actions/runs/4425912321


Connector Did it publish? Were definitions generated?
connectors/source-zoho-crm

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@marcosmarxm marcosmarxm changed the title Marcos/test pr 23818 Source Zoho CRM: Set airbyte type to string for zoho autonumbers when they include prefix or suffix #23818 Mar 15, 2023
@marcosmarxm marcosmarxm requested a review from sajarin March 15, 2023 11:48
@marcosmarxm marcosmarxm merged commit afb4a00 into master Mar 15, 2023
@marcosmarxm marcosmarxm deleted the marcos/test-pr-23818 branch March 15, 2023 15:35
adriennevermorel pushed a commit to adriennevermorel/airbyte that referenced this pull request Mar 17, 2023
… they include prefix or suffix airbytehq#23818 (airbytehq#24034)

* feature: correctly set autonumber type if it contains prefix or suffix

Zoho connector assumes any autonumber data type maps to airbyte's
big_integer. But that is not true as in Zoho you can create incremental
fields with strings in them via the prefix/suffix config params. Taking
this into account we choose string format in case prefix and suffix are
not empty.

* fix unit test and bump connector version

* correct auto_numbe ref

* update docker python base and fix auth

* fix python version file

* fix tests and validate with integration test

* fix  flake

* auto-bump connector version

---------

Co-authored-by: Gerard Clos <clos.gerard@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
erohmensing pushed a commit that referenced this pull request Mar 22, 2023
… they include prefix or suffix #23818 (#24034)

* feature: correctly set autonumber type if it contains prefix or suffix

Zoho connector assumes any autonumber data type maps to airbyte's
big_integer. But that is not true as in Zoho you can create incremental
fields with strings in them via the prefix/suffix config params. Taking
this into account we choose string format in case prefix and suffix are
not empty.

* fix unit test and bump connector version

* correct auto_numbe ref

* update docker python base and fix auth

* fix python version file

* fix tests and validate with integration test

* fix  flake

* auto-bump connector version

---------

Co-authored-by: Gerard Clos <clos.gerard@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
erohmensing pushed a commit that referenced this pull request Mar 22, 2023
… they include prefix or suffix #23818 (#24034)

* feature: correctly set autonumber type if it contains prefix or suffix

Zoho connector assumes any autonumber data type maps to airbyte's
big_integer. But that is not true as in Zoho you can create incremental
fields with strings in them via the prefix/suffix config params. Taking
this into account we choose string format in case prefix and suffix are
not empty.

* fix unit test and bump connector version

* correct auto_numbe ref

* update docker python base and fix auth

* fix python version file

* fix tests and validate with integration test

* fix  flake

* auto-bump connector version

---------

Co-authored-by: Gerard Clos <clos.gerard@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@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/source/zoho-crm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants