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: check "MANAGE" task permission #14786

Merged
merged 13 commits into from
Jul 19, 2022

Conversation

grubberr
Copy link
Contributor

@grubberr grubberr commented Jul 18, 2022

Signed-off-by: Sergey Chvalyuk grubberr@gmail.com

What

Remove field funding_source_details from stream ad_account
if the user making the API call does not have a "MANAGE" task permission for that specific ad account.
More details here:
https://developers.facebook.com/docs/marketing-apis/guides/javascript-ads-dialog-for-payments/
https://developers.facebook.com/docs/marketing-api/reference/ad-account/assigned_users/

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.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
@grubberr grubberr self-assigned this Jul 18, 2022
@github-actions github-actions bot added the area/connectors Connector related issues label Jul 18, 2022
@grubberr grubberr changed the title Source Facebook marketing: check "MANAGE " task permission Source Facebook marketing: check "MANAGE" task permission Jul 18, 2022
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jul 18, 2022
@grubberr
Copy link
Contributor Author

grubberr commented Jul 19, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2695528858
✅ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2695528858
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_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/spec.py                              37      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/api.py                               96     12    88%
source_facebook_marketing/streams/base_streams.py             128     27    79%
source_facebook_marketing/streams/common.py                    40     13    68%
source_facebook_marketing/streams/streams.py                  112     43    62%
source_facebook_marketing/streams/base_insight_streams.py     132     54    59%
source_facebook_marketing/source.py                            39     16    59%
source_facebook_marketing/streams/async_job.py                210    134    36%
source_facebook_marketing/streams/async_job_manager.py         78     60    23%
-------------------------------------------------------------------------------
TOTAL                                                         876    359    59%
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/streams/async_job.py                210      0   100%
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/spec.py                              37      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/streams/common.py                    40      1    98%
source_facebook_marketing/source.py                            39      1    97%
source_facebook_marketing/streams/async_job_manager.py         78      3    96%
source_facebook_marketing/api.py                               96      9    91%
source_facebook_marketing/streams/base_insight_streams.py     132     13    90%
source_facebook_marketing/streams/streams.py                  112     25    78%
source_facebook_marketing/streams/base_streams.py             128     30    77%
-------------------------------------------------------------------------------
TOTAL                                                         876     82    91%

Build Passed

Test summary info:

All Passed

grubberr and others added 3 commits July 19, 2022 10:46
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
@grubberr
Copy link
Contributor Author

grubberr commented Jul 19, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2696268605
✅ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2696268605
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_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/spec.py                              37      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/api.py                               96     12    88%
source_facebook_marketing/streams/base_streams.py             128     27    79%
source_facebook_marketing/streams/common.py                    40     13    68%
source_facebook_marketing/streams/streams.py                  114     45    61%
source_facebook_marketing/streams/base_insight_streams.py     132     54    59%
source_facebook_marketing/source.py                            39     16    59%
source_facebook_marketing/streams/async_job.py                210    134    36%
source_facebook_marketing/streams/async_job_manager.py         78     60    23%
-------------------------------------------------------------------------------
TOTAL                                                         878    361    59%
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/streams/async_job.py                210      0   100%
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/spec.py                              37      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/streams/common.py                    40      1    98%
source_facebook_marketing/source.py                            39      1    97%
source_facebook_marketing/streams/async_job_manager.py         78      3    96%
source_facebook_marketing/api.py                               96      9    91%
source_facebook_marketing/streams/base_insight_streams.py     132     13    90%
source_facebook_marketing/streams/streams.py                  114     26    77%
source_facebook_marketing/streams/base_streams.py             128     30    77%
-------------------------------------------------------------------------------
TOTAL                                                         878     83    91%

Build Passed

Test summary info:

All Passed

@sherifnada sherifnada removed the request for review from evantahler July 19, 2022 14:39
@grubberr
Copy link
Contributor Author

grubberr commented Jul 19, 2022

/publish connector=connectors/source-facebook-marketing

🕑 Publishing the following connectors:
connectors/source-facebook-marketing
https://github.com/airbytehq/airbyte/actions/runs/2698462441


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

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

@grubberr grubberr merged commit c2c03e0 into master Jul 19, 2022
@grubberr grubberr deleted the grubberr/14578-source-facebook-marketing branch July 19, 2022 15:37
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/facebook-marketing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Facebook Marketing should better handle streams/fields where we lack permissions
4 participants