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 Zendesk Support: fix missing ticket_id in ticket_comments stream #7679

Merged
merged 7 commits into from
Nov 17, 2021

Conversation

asyarif93
Copy link
Contributor

@asyarif93 asyarif93 commented Nov 5, 2021

What

close #7631

How

Ticket ID not included in Ticket Comments response, manually add ticket_id to ticket_comments dict using side effects.

Recommended reading order

  1. streams.py

Pre-merge Checklist

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
  • 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
  • After the new connector version is published, connector version bumped in the seed directory 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

@github-actions github-actions bot added the area/connectors Connector related issues label Nov 5, 2021
@asyarif93
Copy link
Contributor Author

unit test results

python -m pytest -s unit_tests
Test session starts (platform: linux, Python 3.8.10, pytest 6.2.5, pytest-sugar 0.9.4)
cachedir: .pytest_cache
rootdir: /home/lpt393/projects/airbyte, configfile: pytest.ini
plugins: timeout-1.4.2, requests-mock-1.9.3, sugar-0.9.4
collecting ... 
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After-123-123] ✓12% █▍        
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After--123-None] ✓25% ██▌       
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit-100-1.2] ✓38% ███▊      
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit--100-None] ✓50% █████     
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Fake-Header--100-None] ✓62% ██████▍   
 airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[200-1-None] ✓75% ███████▌  {"type": "LOG", "log": {"level": "INFO", "message": "ticket 12345 not found (404 error). It could have been deleted."}}

airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[404-0-None] ✓88% ████████▊
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[403-0-HTTPError] ✓100% ██████████
==================================================== warnings summary =====================================================
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After-123-123]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After--123-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit-100-1.2]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit--100-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Fake-Header--100-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[200-1-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[404-0-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[403-0-HTTPError]
/home/lpt393/projects/airbyte/airbyte-integrations/connectors/source-zendesk-support/.venv/lib/python3.8/site-packages/airbyte_cdk/sources/streams/http/http.py:37: DeprecationWarning: Call to deprecated class NoAuth. (Set authenticator=None instead) -- Deprecated since version 0.1.20.
self._authenticator = NoAuth()

airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After-123-123]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Retry-After--123-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit-100-1.2]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[X-Rate-Limit--100-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_backoff_cases[Fake-Header--100-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[200-1-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[404-0-None]
airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py::test_comments_not_found_ticket[403-0-HTTPError]
/home/lpt393/projects/airbyte/airbyte-integrations/connectors/source-zendesk-support/.venv/lib/python3.8/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

Results (0.18s):
8 passed

@marcosmarxm marcosmarxm self-assigned this Nov 8, 2021
@sherifnada sherifnada added this to the Connectors Nov 26 2021 milestone Nov 15, 2021
@sherifnada
Copy link
Contributor

thanks @asyarif93 ! we'll review shortly

@marcosmarxm marcosmarxm temporarily deployed to more-secrets November 17, 2021 17:50 Inactive
@github-actions github-actions bot added area/api Related to the api area/documentation Improvements or additions to documentation area/frontend area/platform issues related to the platform area/protocol area/scheduler area/server area/worker Related to worker CDK Connector Development Kit kubernetes normalization and removed area/scheduler area/protocol area/api Related to the api labels Nov 17, 2021
@github-actions github-actions bot removed kubernetes area/worker Related to worker area/frontend CDK Connector Development Kit area/server area/platform issues related to the platform normalization labels Nov 17, 2021
@marcosmarxm marcosmarxm temporarily deployed to more-secrets November 17, 2021 17:52 Inactive
@marcosmarxm marcosmarxm merged commit cd3afa7 into airbytehq:master Nov 17, 2021
@marcosmarxm
Copy link
Member

Tested and published in #7980

schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…ream (airbytehq#7679)

* fix(zendesk): add ticket_id to ticket_comments

* test(zendesk): set ticket cursor_field far in future

* bump connector version

* doc

* run seed file

Co-authored-by: Marcos Marx <marcosmarxm@gmail.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 community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zendesk support: no ticket_id in ticket_comments stream
4 participants