Skip to content

Conversation

@aazam-gh
Copy link
Contributor

@aazam-gh aazam-gh commented Feb 13, 2023

What

Adding a new stream email subscriptions
Returns all email subscription types that have been created in the given Hub ID.

How

The connector adds the email subscription API stream
Fixes #17034

Recommended reading order

  1. source.py
  2. streams.py

🚨 User Impact 🚨

No changes to existing code

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

image

@aazam-gh
Copy link
Contributor Author

image
The integration test for incremental read fails. The stream is not an incremental one

@YowanR
Copy link
Contributor

YowanR commented Feb 17, 2023

@Alcadeus0 Is it possible to make this stream incremental? Is there a cursor available?

@aazam-gh
Copy link
Contributor Author

@YowanR Unfortunately this stream doesn't have a cursor field available

@YowanR
Copy link
Contributor

YowanR commented Feb 27, 2023

@sh4sh @natalyjazzviolin Can you please take a look at this PR? Thanks 🙏

@YowanR
Copy link
Contributor

YowanR commented Mar 17, 2023

@marcosmarxm @sajarin can you take a look?

@marcosmarxm
Copy link
Contributor

marcosmarxm commented Mar 17, 2023

/test connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4450038178
❌ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4450038178
🐛 https://gradle.com/s/mij3hzz3dw5uo

Build Failed

Test summary info:

 =========================== short test summary info ============================ ERROR integration_tests/test_associations.py::test_incremental_read_fetches_associations �[31m======================== �[33m55 warnings�[0m, �[31m�[1m1 error�[0m�[31m in 0.99s�[0m�[31m =========================�[0m 
@aazam-gh
Copy link
Contributor Author

aazam-gh commented Mar 18, 2023

image

@marcosmarxm can you take a look

@marcosmarxm
Copy link
Contributor

marcosmarxm commented Mar 21, 2023

/test connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4481449916
❌ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4481449916
🐛 https://gradle.com/s/mvdx7lujkb546

Build Failed

Test summary info:

=========================== short test summary info ============================ FAILED test_core.py::TestDiscovery::test_primary_keys_exist_in_schema[inputs0] ERROR test_core.py::TestBasicRead::test_read[inputs0] - Failed: High strictne... SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical. ========= 1 failed, 36 passed, 1 skipped, 1 error in 415.19s (0:06:55) ========= 
@aazam-gh
Copy link
Contributor Author

/test connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4481449916

What does that mean?

@marcosmarxm marcosmarxm added the contributor-program PRs submitted through the contributor program. label Mar 22, 2023
Copy link
Contributor

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

Left some comments about the stream schema please fix them.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": ["null", "object"],
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

missing the additionalProperties field, please check others stream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other streams don't have the additional properties field as well. Can you point me to the docs where they are?

"$schema": "http://json-schema.org/draft-07/schema#",
"type": ["null", "object"],
"properties": {
"subscriptionDefinitions": {
Copy link
Contributor

Choose a reason for hiding this comment

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

The schema is wrong. You want an unity record which is the data inside the subscriptionDefinitions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I've removed the subscription definition and made it point as a unitary one

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Mar 28, 2023
@marcosmarxm
Copy link
Contributor

marcosmarxm commented Mar 31, 2023

/test connector=source-hubspot

🕑 source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4579476271
✅ source-hubspot https://github.com/airbytehq/airbyte/actions/runs/4579476271
Python tests coverage:

Name Stmts Miss Cover ------------------------------------------------- source_hubspot/errors.py 6 0 100% source_hubspot/constants.py 2 0 100% source_hubspot/__init__.py 2 0 100% source_hubspot/helpers.py 70 3 96% source_hubspot/streams.py 841 77 91% source_hubspot/source.py 60 19 68% ------------------------------------------------- TOTAL 981 99 90% Name Stmts Miss Cover ------------------------------------------------- source_hubspot/errors.py 6 0 100% source_hubspot/constants.py 2 0 100% source_hubspot/__init__.py 2 0 100% source_hubspot/helpers.py 70 10 86% source_hubspot/source.py 60 14 77% source_hubspot/streams.py 841 217 74% ------------------------------------------------- TOTAL 981 241 75% 

Build Passed

Test summary info:

=========================== short test summary info ============================ SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical. ================== 41 passed, 1 skipped in 408.18s (0:06:48) =================== 
@aazam-gh
Copy link
Contributor Author

@marcosmarxm Are the tests not successful? It should have merged right?

@marcosmarxm
Copy link
Contributor

@marcosmarxm Are the tests not successful? It should have merged right?

Yes, Tests are working now. I need the final approval from the connector team and it is ready to merge. There isn't anything in your side right now! Thanks for the contribution @Alcadeus0

@marcosmarxm marcosmarxm requested review from lazebnyi and removed request for natalyjazzviolin April 1, 2023 01:41
Copy link
Contributor

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

Thanks @Alcadeus0

@aazam-gh
Copy link
Contributor Author

aazam-gh commented Apr 1, 2023

Thanks for your help with the review :)

Copy link
Contributor

@lazebnyi lazebnyi left a comment

Choose a reason for hiding this comment

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

Nice!

@marcosmarxm
Copy link
Contributor

marcosmarxm commented Apr 3, 2023

/publish connector=connectors/source-hubspot

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


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

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

@marcosmarxm marcosmarxm merged commit fcfcf49 into airbytehq:master Apr 3, 2023
@aazam-gh aazam-gh deleted the emailsubapi branch June 7, 2023 16:55
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 community connectors/source/hubspot contributor-program PRs submitted through the contributor program.

5 participants