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 Kustomer: fix KeyError: 'user_agent' when retrieving schema #15132

Closed
wants to merge 1 commit into from
Closed

🐛 Source Kustomer: fix KeyError: 'user_agent' when retrieving schema #15132

wants to merge 1 commit into from

Conversation

georginssohn
Copy link

@georginssohn georginssohn commented Jul 28, 2022

What

Currently the Kustomer source connector is broken (see #14965).

With current master branch:
image
image

With this PR:
image
image

How

The User Agent field is required in the config.json, it was removed in a previous PR but the documentation does not state why. This parameter is used when initializing the tap:

https://github.com/singer-io/tap-kustomer/blob/b56a2cc3646d57b8c1eb8876a335073a8968fd00/tap_kustomer/__init__.py#L36-L37

Background:

🚨 User Impact 🚨

The connector configuration now requires to specify the User Agent to be used for Kustomer API.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

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

@CLAassistant
Copy link

CLAassistant commented Jul 28, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the area/connectors Connector related issues label Jul 28, 2022
@georginssohn georginssohn changed the title Fix KeyError: 'user_agent' with Kustomer source connector Source Kustomer: Fix KeyError: 'user_agent' Jul 28, 2022
@georginssohn georginssohn changed the title Source Kustomer: Fix KeyError: 'user_agent' 🐛 Source Kustomer: Fix KeyError: 'user_agent' Jul 28, 2022
@georginssohn georginssohn changed the title 🐛 Source Kustomer: Fix KeyError: 'user_agent' 🐛 Source Kustomer: Fix KeyError: 'user_agent' when retrieving schema Jul 28, 2022
@georginssohn georginssohn changed the title 🐛 Source Kustomer: Fix KeyError: 'user_agent' when retrieving schema 🐛 Source Kustomer: fix KeyError: 'user_agent' when retrieving schema Jul 28, 2022
@georginssohn georginssohn marked this pull request as ready for review July 28, 2022 22:47
@georginssohn georginssohn requested a review from a team as a code owner July 28, 2022 23:08
@sajarin
Copy link
Contributor

sajarin commented Aug 1, 2022

/test connector=connectors/source-kustomer-singer

🕑 connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2776491107
❌ connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2776491107
🐛

@georginssohn
Copy link
Author

georginssohn commented Aug 1, 2022

Error does not seem to be related, but not sure how to make integration tests pass successfully:

ci_common_utils installed: attrs==22.1.0,certifi==2022.6.15,cffi==1.15.1,charset-normalizer==2.1.0,-e git+https://github.com/Solofundsnyc/airbyte@1fa3a4ca7149670c69934ad30f265d8e34ee1c74#egg=ci_common_utils&subdirectory=tools/ci_common_utils,cryptography==37.0.4,flake8==5.0.2,idna==3.3,iniconfig==1.1.1,mccabe==0.7.0,packaging==21.3,pluggy==1.0.0,py==1.11.0,pycodestyle==2.9.0,pycparser==2.21,pyflakes==2.5.0,PyJWT==2.3.0,pyparsing==3.0.9,pyproject-flake8==0.0.1a4,pytest==6.2.5,requests==2.28.1,requests-mock==1.9.3,six==1.16.0,toml==0.10.2,tomli==2.0.1,urllib3==1.26.11
ci_common_utils run-test-pre: PYTHONHASHSEED='3470393811'
ci_common_utils run-test: commands[0] | pflake8 --config /actions-runner/_work/airbyte/airbyte/tools/../pyproject.toml /actions-runner/_work/airbyte/airbyte/tools/ci_common_utils
Traceback (most recent call last):
  File "/actions-runner/_work/airbyte/airbyte/tools/.tox/ci_common_utils/bin/pflake8", line 5, in <module>
    from pflake8.__main__ import main
  File "/actions-runner/_work/airbyte/airbyte/tools/.tox/ci_common_utils/lib/python3.9/site-packages/pflake8/__init__.py", line 54, in <module>
    class ModifiedConfigFileFinder(flake8.options.config.ConfigFileFinder):
AttributeError: module 'flake8.options.config' has no attribute 'ConfigFileFinder'

@sajarin
Copy link
Contributor

sajarin commented Aug 1, 2022

/test connector=connectors/source-kustomer-singer

🕑 connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2777016235
❌ connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2777016235
🐛

@sajarin
Copy link
Contributor

sajarin commented Aug 1, 2022

Hi @ivansabik, could you pull the latest changes from master? We recently made some changes to the github actions workflow.

@sajarin sajarin requested review from sajarin and removed request for a team August 1, 2022 19:24
@sajarin sajarin self-assigned this Aug 1, 2022
@sajarin
Copy link
Contributor

sajarin commented Aug 2, 2022

/test connector=connectors/source-kustomer-singer

🕑 connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2783727017
✅ connectors/source-kustomer-singer https://github.com/airbytehq/airbyte/actions/runs/2783727017
No Python unittests run

Build Passed

Test summary info:

All Passed

Copy link
Contributor

@sajarin sajarin left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!

@sajarin
Copy link
Contributor

sajarin commented Aug 2, 2022

/publish connector=connectors/source-kustomer-singer

🕑 Publishing the following connectors:
connectors/source-kustomer-singer
https://github.com/airbytehq/airbyte/actions/runs/2784880942


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

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

@sajarin
Copy link
Contributor

sajarin commented Aug 4, 2022

/publish connector=connectors/source-kustomer-singer

🕑 Publishing the following connectors:
connectors/source-kustomer-singer
https://github.com/airbytehq/airbyte/actions/runs/2797638092


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

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

@marcosmarxm
Copy link
Member

Sorry the delay here @ivansabik we're having problems publishing Singer based connectors. As soon we solve the problem 'll return here

@georginssohn
Copy link
Author

No problem, let me know if you need me to rebase or change anything :)

@marcosmarxm
Copy link
Member

@ivansabik I'm closing this in favor of in favor of #16480 which implements Kustomer using native Airbyte CDK.

@marcosmarxm marcosmarxm closed this Oct 6, 2022
@georginssohn
Copy link
Author

Great news! I found other issues with the Kustomer tap and looks like it has not been maintained in a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants