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 Posthog - migration to low code, from alpha to beta #18993

Merged
merged 29 commits into from Dec 16, 2022

Conversation

midavadim
Copy link
Collaborator

What

Describe what the change is solving
It helps to add screenshots if it affects the frontend.

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

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@CLAassistant
Copy link

CLAassistant commented Nov 4, 2022

CLA assistant check
All committers have signed the CLA.

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 6, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3405925223
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3405925223
🐛 https://gradle.com/s/xq4q7l53axjbi

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
============= 1 failed, 28 passed, 29 warnings in 66.29s (0:01:06) =============

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 10, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3436960694
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3436960694
🐛 https://gradle.com/s/cu2gsv2rl2wsy

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
================== 1 failed, 28 passed, 29 warnings in 55.11s ==================

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 10, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3437075969
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3437075969
🐛 https://gradle.com/s/fzjqicqvsrgnm

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
================== 1 failed, 28 passed, 29 warnings in 57.03s ==================

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 10, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3438111895
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3438111895
🐛 https://gradle.com/s/4vie5dpp7eob2

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
============= 1 failed, 28 passed, 29 warnings in 60.84s (0:01:00) =============

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 10, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3438362658
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3438362658
🐛 https://gradle.com/s/ij4zap5d3kanq

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0]
============= 1 failed, 29 passed, 30 warnings in 61.57s (0:01:01) =============

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 10, 2022

/test connector=connectors/source-posthog

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

Name                           Stmts   Miss  Cover
--------------------------------------------------
source_posthog/source.py           4      0   100%
source_posthog/__init__.py         2      0   100%
source_posthog/components.py      28     13    54%
--------------------------------------------------
TOTAL                             34     13    62%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       139      5    96%   87, 93, 235, 239-240
	 source_acceptance_test/conftest.py                     196     92    53%   35, 41-43, 48, 54, 60, 66, 72-74, 93, 98-100, 106-108, 114-115, 120-121, 126, 132, 141-150, 156-161, 176, 200, 231, 237, 243-248, 256-261, 269-282, 287-293, 300-311, 318-334
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              353    110    69%   53, 64-72, 77-84, 88-89, 93-94, 192, 230-247, 256-264, 268-273, 279, 312-317, 355-362, 405-407, 410, 475-483, 495-498, 503, 559-560, 566, 569, 605-615, 628-653
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 37      2    95%   57-58
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       112     50    55%   23-26, 32, 36, 39-68, 71-73, 76-78, 81-83, 86-88, 91-93, 96-114, 148-150
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%   30-31, 38, 41, 65-68, 96, 120, 190-192
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1516    348    77%

Build Passed

Test summary info:

All Passed

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 11, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3445256063
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3445256063
🐛 https://gradle.com/s/wh7hoc62b3ii2

Build Failed

Test summary info:

Could not find result summary

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 11, 2022

/test connector=connectors/source-posthog

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

Name                           Stmts   Miss  Cover
--------------------------------------------------
source_posthog/source.py           4      0   100%
source_posthog/__init__.py         2      0   100%
source_posthog/components.py      28      1    96%
--------------------------------------------------
TOTAL                             34      1    97%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       139      5    96%   87, 93, 235, 239-240
	 source_acceptance_test/conftest.py                     196     92    53%   35, 41-43, 48, 54, 60, 66, 72-74, 93, 98-100, 106-108, 114-115, 120-121, 126, 132, 141-150, 156-161, 176, 200, 231, 237, 243-248, 256-261, 269-282, 287-293, 300-311, 318-334
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              353    110    69%   53, 64-72, 77-84, 88-89, 93-94, 192, 230-247, 256-264, 268-273, 279, 312-317, 355-362, 405-407, 410, 475-483, 495-498, 503, 559-560, 566, 569, 605-615, 628-653
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 37      2    95%   57-58
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       112     50    55%   23-26, 32, 36, 39-68, 71-73, 76-78, 81-83, 86-88, 91-93, 96-114, 148-150
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%   30-31, 38, 41, 65-68, 96, 120, 190-192
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1516    348    77%

Build Passed

Test summary info:

All Passed

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 30, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3582502865
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3582502865
🐛

Build Passed

Test summary info:

All Passed

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 30, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3582639586
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3582639586
🐛

Build Passed

Test summary info:

All Passed

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 30, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3584624387
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3584624387
🐛 https://gradle.com/s/csfd4blplgrsm

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_components.py::test_stream_slices[test_empty_state-stream_state0-expected_stream_slices0]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_state-stream_state1-expected_stream_slices1]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_old_stype_state-stream_state2-expected_stream_slices2]
	 �[31m=================== �[31m�[1m3 failed�[0m, �[32m7 passed�[0m, �[33m27 warnings�[0m�[31m in 2.34s�[0m�[31m ===================�[0m

@midavadim
Copy link
Collaborator Author

midavadim commented Nov 30, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3584932139
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3584932139
🐛 https://gradle.com/s/gd5yeswxtym4q

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_components.py::test_stream_slices[test_empty_state-stream_state0-expected_stream_slices0]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_state-stream_state1-expected_stream_slices1]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_old_stype_state-stream_state2-expected_stream_slices2]
	 �[31m=================== �[31m�[1m3 failed�[0m, �[32m7 passed�[0m, �[33m27 warnings�[0m�[31m in 2.44s�[0m�[31m ===================�[0m

@midavadim
Copy link
Collaborator Author

midavadim commented Dec 1, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3596037113
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3596037113
🐛 https://gradle.com/s/jd2a6wuiw3a3o

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_components.py::test_stream_slices[test_empty_state-stream_state0-expected_stream_slices0]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_state-stream_state1-expected_stream_slices1]
	 FAILED unit_tests/test_components.py::test_stream_slices[test_old_stype_state-stream_state2-expected_stream_slices2]
	 �[31m=================== �[31m�[1m3 failed�[0m, �[32m7 passed�[0m, �[33m27 warnings�[0m�[31m in 2.25s�[0m�[31m ===================�[0m

@midavadim
Copy link
Collaborator Author

midavadim commented Dec 8, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3651896207
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3651896207
🐛

@midavadim
Copy link
Collaborator Author

midavadim commented Dec 8, 2022

/test connector=connectors/source-posthog

🕑 connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3652074576
❌ connectors/source-posthog https://github.com/airbytehq/airbyte/actions/runs/3652074576
🐛

@midavadim
Copy link
Collaborator Author

midavadim commented Dec 8, 2022

/test connector=connectors/source-posthog

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

Name                           Stmts   Miss  Cover
--------------------------------------------------
source_posthog/source.py           4      0   100%
source_posthog/__init__.py         2      0   100%
source_posthog/components.py      44      3    93%
--------------------------------------------------
TOTAL                             50      3    94%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       140      5    96%   87, 93, 238, 242-243
	 source_acceptance_test/conftest.py                     208     92    56%   36, 42-44, 49, 54, 77, 83, 89-91, 110, 115-117, 123-125, 131-132, 137-138, 143, 149, 158-167, 173-178, 193, 217, 248, 254, 262-267, 275-280, 288-301, 306-312, 319-330, 337-353
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              398    111    72%   53, 58, 87-95, 100-107, 111-112, 116-117, 299, 337-354, 363-371, 375-380, 386, 419-424, 462-469, 512-514, 517, 582-590, 602-605, 610, 666-667, 673, 676, 712-722, 735-760
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       133     33    75%   24-27, 46-47, 50-54, 57-58, 73-75, 78-80, 83-85, 88-90, 93-95, 124-125, 159-161, 208
	 source_acceptance_test/utils/json_schema_helper.py     107     13    88%   30-31, 38, 41, 65-68, 96, 120, 192-194
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1599    332    79%

Build Passed

Test summary info:

All Passed

Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

2 questions about whether we can get rid of EventsSimpleRetriever and steams.py. Looks good otherwise

@midavadim midavadim temporarily deployed to more-secrets December 16, 2022 17:38 — with GitHub Actions Inactive
@midavadim midavadim temporarily deployed to more-secrets December 16, 2022 17:39 — with GitHub Actions Inactive
@midavadim
Copy link
Collaborator Author

midavadim commented Dec 16, 2022

/publish connector=connectors/source-posthog

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


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

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

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets December 16, 2022 19:14 — with GitHub Actions Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets December 16, 2022 19:14 — with GitHub Actions Inactive
@midavadim midavadim merged commit f7fc223 into master Dec 16, 2022
@midavadim midavadim deleted the midavadim/posthog-low-code branch December 16, 2022 19:18
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/posthog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants