Skip to content

🚀 Source Klaviyo: New Stream addition along with update to existing #11685

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

Merged

Conversation

ahmed-buksh
Copy link
Contributor

@ahmed-buksh ahmed-buksh commented Apr 4, 2022

What

Enhance Klaviyo source to provide flows information along with event updated with relational information.

How

  • Flows schema is added
  • Event schema is updated with new fields like flow_id, campaign_id, and flow_message_id

Recommended reading order

  1. airbyte-integrations/connectors/source-klaviyo/integration_tests/configured_catalog.json
  2. airbyte-integrations/connectors/source-klaviyo/source_klaviyo/schemas.py
  3. airbyte-integrations/connectors/source-klaviyo/source_klaviyo/streams.py
  4. airbyte-integrations/connectors/source-klaviyo/source_klaviyo/source.py

🚨 User Impact 🚨

No breaking changes

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 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

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@github-actions github-actions bot added the area/connectors Connector related issues label Apr 4, 2022
@marcosmarxm
Copy link
Member

@ahmed-buksh please ping me this PR is ready to review.

@marcosmarxm
Copy link
Member

@ahmed-buksh are you planning to keep working on this? Today is a draft, please let me know!

@ahmed-buksh ahmed-buksh marked this pull request as ready for review April 15, 2022 06:05
@ahmed-buksh
Copy link
Contributor Author

ahmed-buksh commented Apr 15, 2022

@marcosmarxm sorry for the delay, I switched to some other work. I am just ensuring a few tests are working fine so it's in progress for now.

@ahmed-buksh ahmed-buksh changed the title 🚀 Enhancement to Klaviyo Source 🚀 [WIP] Enhancement to Klaviyo Source Apr 15, 2022
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Apr 15, 2022
@ahmed-buksh ahmed-buksh changed the title 🚀 [WIP] Enhancement to Klaviyo Source 🚀 Enhancement to Klaviyo Source Apr 15, 2022
@ahmed-buksh
Copy link
Contributor Author

@marcosmarxm I made a couple of changes that were breaking a test but I generally see 2 tests failing on Klaivyo's existing code base as well. Should we halt until we have to fix them as well or we can move forward with this?

@ahmed-buksh ahmed-buksh changed the title 🚀 Enhancement to Klaviyo Source 🚀 Source Klaviyo: New Stream addition along with update to existing Apr 15, 2022
@marcosmarxm
Copy link
Member

marcosmarxm commented Apr 19, 2022

/test connector=connectors/source-klaviyo

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2186848392
❌ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2186848392
🐛 https://gradle.com/s/pfg6t5kieju7o

@harshithmullapudi harshithmullapudi self-requested a review April 25, 2022 15:01
@harshithmullapudi harshithmullapudi self-assigned this Apr 25, 2022
@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented Apr 27, 2022

/test connector=connectors/source-klaviyo

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2231927358
❌ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2231927358
🐛 https://gradle.com/s/s4p7m6c3taytg

@CLAassistant
Copy link

CLAassistant commented May 5, 2022

CLA assistant check
All committers have signed the CLA.

@harshithmullapudi
Copy link
Contributor

@ahmed-buksh can you check the failed tests and share the screenshot of tests passing in local

@ahmed-buksh
Copy link
Contributor Author

@harshithmullapudi I just fixed the tests and they are all passed.
Screen Shot 2022-05-09 at 19 09 30

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 16, 2022

/test connector=connectors/source-klaviyo

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2331243705
❌ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2331243705
🐛 https://gradle.com/s/haw7gffyiauxg

@harshithmullapudi
Copy link
Contributor

Hey @ahmed-buksh can you check these

  1. Merge the latest master
  2. Run ./gradlew format
  3. Check for the sourceAcceptanceTest

@ahmed-buksh
Copy link
Contributor Author

ahmed-buksh commented May 25, 2022

@harshithmullapudi I executed ./gradlew :airbyte-integrations:connectors:source-klaviyo:format from root directory but klaviyo has no support for format
Other than that I pulled master and re-ran tests and it worked fine.
As per previous log, there seems to be a Flake8 issue which I just fixed and pushed.

@ahmed-buksh
Copy link
Contributor Author

/test connector=connectors/source-klaviyo

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 31, 2022

/test connector=connectors/source-klaviyo

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2412743066
❌ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2412743066
🐛 https://gradle.com/s/b3pm4fljddwp2

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - AssertionError: All ...
======================== 1 failed, 23 passed in 17.42s =========================

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 31, 2022

/test connector=connectors/source-klaviyo

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2412922642
✅ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2412922642
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        77      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/tests/test_incremental.py       121     25    79%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/tests/test_core.py              294    106    64%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
------------------------------------------------------------------------
TOTAL                                                  960    246    74%
Name                         Stmts   Miss  Cover
------------------------------------------------
source_klaviyo/__init__.py       2      0   100%
source_klaviyo/streams.py      136     21    85%
source_klaviyo/schemas.py      102     26    75%
source_klaviyo/source.py        28     12    57%
------------------------------------------------
TOTAL                          268     59    78%

Build Passed

Test summary info:

All Passed

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 31, 2022

/publish connector=connectors/source-klaviyo auto-bump-version=false

🕑 connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2413035840
🚀 Successfully published connectors/source-klaviyo
✅ connectors/source-klaviyo https://github.com/airbytehq/airbyte/actions/runs/2413035840

@harshithmullapudi harshithmullapudi force-pushed the enhancement/source-klaviyo branch from 9e5fdb9 to 34af4e6 Compare May 31, 2022 06:42
@harshithmullapudi harshithmullapudi merged commit c55f185 into airbytehq:master May 31, 2022
jscottpolevault pushed a commit to jscottpolevault/airbyte that referenced this pull request Jun 1, 2022
…irbytehq#11685)

* 🚀 flow stream added along with flow, campaign and flow message addition to event

* ⚡ liniting fix

* 🔨 annotations updated along with update method for klaviyo

* 💥 docker version updated and log added

* 🔨 fixed acceptance test for klaviyo flow stream

* 🔨 unused import removed

* fix: flows stream has no records thus tests are failing

* chore: update seed file

Co-authored-by: Harshith Mullapudi <[email protected]>
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.

5 participants