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 Facebook Marketing - add action report time enum to adinsights class #26345

Conversation

pnavarromuttdata
Copy link
Contributor

@pnavarromuttdata pnavarromuttdata commented May 22, 2023

What

In the AdInsights class is not available the action_report_time enumeration as the Facebook Marketing docs suggest.

Issue

How

Add new action_report_time attribute to AdInsights class, so when someone creates a new source connector, it could specify the custom action_report_time needed (mixed, conversion or impression) having as a default value mixed.
image

Recommended reading order

  1. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py
  2. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/source.py
  3. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/spec.py
  4. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/integration_tests/spec.json
  5. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/unit_tests/test_async_job.py
  6. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/unit_tests/test_source.py
  7. airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/unit_tests/test_streams.py

🚨 User Impact 🚨

By default, it will have the same behaviour as is (action_report_time current default value is mixed according to this FB docs).

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

Tests

Unit

Put your unit tests output here.

============================================================== warnings summary ============================================================== airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_async_job.py::TestInsightAsyncJob::test_get_result_retried /home/pablo/Documents/mixilo/airbyte-pan-mutt-data/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_async_job.py:308: PytestMockWarning: Mocks returned by pytest-mock do not need to be used as context managers. The mocker fixture automatically undoes mocking at the end of a test. This warning can be ignored if it was triggered by mocking a context manager. https://github.com/pytest-dev/pytest-mock#note-about-usage-as-context-manager with mocker.patch(

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Results (1.35s):
119 passed

image

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

pnavarromuttdata and others added 14 commits December 7, 2022 17:47
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…ebook_marketing/add_action_report_time_enum_to_adinsights_class
…o_adinsights_class' of github.com:pnavarromuttdata/airbyte-pan-mutt-data into source_facebook_marketing/add_action_report_time_enum_to_adinsights_class
@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan and you've followed all steps in the Breaking Changes Checklist
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • You, or an Airbyter, have run /test successfully on this PR - or on a non-forked branch
  • You've updated the connector's metadata.yaml file (new!)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
@sajarin sajarin changed the title 🎉 Source facebook marketing/add action report time enum to adinsights class 🎉 Source Facebook Marketing - add action report time enum to adinsights class May 25, 2023
@sajarin
Copy link
Contributor

sajarin commented May 25, 2023

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/5083502800
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/5083502800
🐛 https://gradle.com/s/oyan2unh5deyg

Build Failed

Test summary info:

Could not find result summary

@pnavarromuttdata
Copy link
Contributor Author

@lazebnyi thanks to you for the review!
I requested to merge it

pnavarromuttdata and others added 6 commits June 29, 2023 13:11
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…t_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…o_adinsights_class_seccond_attempt' of github.com:pnavarromuttdata/airbyte-pan-mutt-data into source_facebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
@bmcgilli
Copy link
Contributor

@lazebnyi are you waiting on the contributor here?

…ebook_marketing/add_action_report_time_enum_to_adinsights_class_seccond_attempt
…t_time_enum_to_adinsights_class_seccond_attempt
@lazebnyi lazebnyi assigned lazebnyi and unassigned sajarin Jul 12, 2023
@lazebnyi
Copy link
Collaborator

@bmcgilli No, I have some issues with testing changes with CI. After successful tests, the PR will be merged.

@lazebnyi lazebnyi merged commit 9f12062 into airbytehq:master Jul 12, 2023
34 of 37 checks passed
efimmatytsin pushed a commit to scentbird/airbyte that referenced this pull request Jul 27, 2023
…ts class (airbytehq#26345)

* chore: bump version

* feat: new action_report_time spec into custom_insights stream

* feat: airbyte-config new action_report_time enum spec into custom_insights stream FBMarketing

* feat: new action_report_time tests

* fix: update allOf instead of array json spec

* chore: update docs source connector

* update pr id into version history doc

* update metadata.yaml

* adding action report time into cloud registry and oss registry

* fix formatting of python files

* fix: update type action_report_time

* fix: update title action report time

* fix: format python files with flake8

* fix: update version to minor version

* fix: remove action report time default value in test_get_custom_insights_stream

* fix: keep old config for some unit tests

* fix: put missing action breakdowns

* fix: remove default value variable and set into class argument directly

* chore: bump version

* Delete changes from cloud_registry

* Removed action_report_time from oss registry

---------

Co-authored-by: Juan Marchese <juan.marchese@muttdata.ai>
Co-authored-by: sajarin <sajarindider@gmail.com>
Co-authored-by: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com>
Co-authored-by: Serhii Lazebnyi <serhii.lazebnyi@globallogic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants