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

🎉 New Source: Genesys [python cdk] #17559

Merged
merged 79 commits into from
Nov 18, 2022

Conversation

koconder
Copy link
Contributor

@koconder koconder commented Oct 4, 2022

What

This change adds an initial release of a source connector for the Genesys cloud platform.

How

The initial release of the connector extracts information about the following:

  • Users

Closes: airbytehq/connector-contest#48

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

Tests

Unit

========================================= test session starts ==========================================
platform darwin -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /Users/vincentkoc/Git/_PERSO/airbyte/.venv3/bin/python
cachedir: .pytest_cache
rootdir: /Users/vincentkoc/Git/_PERSO/airbyte, configfile: pytest.ini
plugins: mock-3.6.1
collected 10 items

unit_tests/test_source.py::test_check_connection PASSED
unit_tests/test_source.py::test_streams PASSED
unit_tests/test_streams.py::test_request_params PASSED
unit_tests/test_streams.py::test_request_headers PASSED
unit_tests/test_streams.py::test_http_method PASSED
unit_tests/test_streams.py::test_should_retry[HTTPStatus.OK-False] PASSED
unit_tests/test_streams.py::test_should_retry[HTTPStatus.BAD_REQUEST-False] PASSED
unit_tests/test_streams.py::test_should_retry[HTTPStatus.TOO_MANY_REQUESTS-True] PASSED
unit_tests/test_streams.py::test_should_retry[HTTPStatus.INTERNAL_SERVER_ERROR-True] PASSED
unit_tests/test_streams.py::test_backoff_time PASSED

=========================================== warnings summary ===========================================
airbyte-integrations/connectors/source-genesys/unit_tests/test_source.py: 16 warnings
airbyte-integrations/connectors/source-genesys/unit_tests/test_streams.py: 8 warnings
/Users/vincentkoc/Git/_PERSO/airbyte/.venv3/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py:41: DeprecationWarning: Call to deprecated class NoAuth. (Set authenticator=None instead) -- Deprecated since version 0.1.20.
self._authenticator: HttpAuthenticator = NoAuth()

airbyte-integrations/connectors/source-genesys/unit_tests/test_source.py: 16 warnings
airbyte-integrations/connectors/source-genesys/unit_tests/test_streams.py: 8 warnings
/Users/vincentkoc/Git/_PERSO/airbyte/.venv3/lib/python3.9/site-packages/deprecated/classic.py:173: DeprecationWarning: Call to deprecated class HttpAuthenticator. (Use requests.auth.AuthBase instead) -- Deprecated since version 0.1.20.
return old_new1(cls, *args, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=================================== 10 passed, 48 warnings in 4.79s ====================================

Integration

========================================= test session starts ==========================================
platform darwin -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /Users/vincentkoc/Git/_PERSO/airbyte/.venv3/bin/python
cachedir: .pytest_cache
rootdir: /Users/vincentkoc/Git/_PERSO/airbyte, configfile: pytest.ini
plugins: mock-3.6.1
collected 0 items

======================================== no tests ran in 0.01s =========================================

Acceptance

Put your acceptance tests output here.

@koconder
Copy link
Contributor Author

Thanks @YiyangLi ill get back to you soon witj the changes requested 👍

@ycherniaiev
Copy link
Contributor

ycherniaiev commented Oct 26, 2022

Integration Vetting

Webhook-based? (no/partially/yes)
partially
Available authentication modes (A key/Oauth/other)
Oauth 2.0

is there an SDK available? Can we connect with HTTP requests directly?
SDK https://developer.genesys.cloud/platform/integrations/client-apps/client-app-sdk-guide

Creating an account
self-service paid account
Pricing: https://www.genesys.com/pricing

Will it require some work through the UI? If so, what is required?
Yes.

Has Sandbox environment?
Yes, after paid subsctiption

Available streams for sync

Add/Remove users from the system Users API
Get realtime user and queue statistics Analytics API, Aggregate Query Guide
Get historical conversation information Analytics API
Interaction with live conversations Conversations API, Call Handling Guide
Upload documents into content management Content Management API
Download recordings Recordings API
Implement WebChat Guest APIs and Agent APIs
Subscribe to realtime events Notifications API, Presence Guide
Download user (ad-hoc) recordings User Recordings
Manage call lists Outbound Dialing
Integrate with Genesys Cloud General Integration Guide

Integration supports incremental sync?
Partially ( not all streams)

Other information/blockers
Analytics stream has asynchoronuous sync
https://developer.genesys.cloud/analyticsdatamanagement/analytics/

@koconder
Copy link
Contributor Author

@YiyangLi thanks for your review comments, I have pushed all my changes. Gradle results are also passing for intergration and acceptance tests:

====== warnings summary ===============================
../usr/local/lib/python3.9/site-packages/source_acceptance_test/config.py:246: 26 warnings
test_core.py: 1 warning
  /usr/local/lib/python3.9/site-packages/source_acceptance_test/config.py:246: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead
    logging.warn("The acceptance-test-config.yml file is in a legacy format. Please migrate to the latest format.")

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_core.py:51: The previous connector image could not be retrieved.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_core.py:229: The previous connector image could not be retrieved.
================= 24 passed, 3 skipped, 27 warnings in 39.39s ==================

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.4/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 3m 50s
48 actionable tasks: 28 executed, 20 up-to-date

@koconder
Copy link
Contributor Author

koconder commented Nov 13, 2022

/publish connector=connectors/source-genesys run-tests=false

🕑 Publishing the following connectors:
connectors/source-genesys
https://github.com/airbytehq/airbyte/actions/runs/3455090255


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

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

Copy link
Contributor

@YiyangLi YiyangLi left a comment

Choose a reason for hiding this comment

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

:shipit:

@koconder
Copy link
Contributor Author

Resolved merge conflicts, ready to merge @marcosmarxm @sajarin @YiyangLi

@YiyangLi
Copy link
Contributor

YiyangLi commented Nov 15, 2022

/test connector=connectors/source-genesys

🕑 connectors/source-genesys https://github.com/airbytehq/airbyte/actions/runs/3467520427
❌ connectors/source-genesys https://github.com/airbytehq/airbyte/actions/runs/3467520427
🐛 https://gradle.com/s/xxilgmvp3kkfy

Build Failed

Test summary info:

=========================== short test summary info ============================
ERROR test_core.py::TestSpec::test_config_match_spec[inputs0] - FileNotFoundE...
ERROR test_core.py::TestConnection::test_check[inputs0] - FileNotFoundError: ...
ERROR test_core.py::TestDiscovery::test_discover[inputs0] - FileNotFoundError...
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] - Fil...
ERROR test_core.py::TestDiscovery::test_additional_properties_is_true[inputs0]
ERROR test_core.py::TestDiscovery::test_backward_compatibility[inputs0] - Fil...
ERROR test_core.py::TestBasicRead::test_read[inputs0] - FileNotFoundError: [E...
ERROR test_core.py::TestBasicRead::test_airbyte_trace_message_on_failure[inputs0]
ERROR test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
============ 14 passed, 1 skipped, 29 warnings, 14 errors in 23.19s ============

@YiyangLi
Copy link
Contributor

@koconder did you provide the credential to @sajarin? If not, can work with him to setup the test account used for the CI? Thanks.

@sajarin sajarin merged commit 862df97 into airbytehq:master Nov 18, 2022
@koconder koconder deleted the koconder-connector-genesys branch November 18, 2022 19:57
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 bounty bounty-XL Maintainer program: claimable extra large bounty PR community connectors/source/genesys hacktober reward-200
Projects
Development

Successfully merging this pull request may close these issues.

Source: Genesys
7 participants