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 FB Marketing: add incremental support #1699

Merged
merged 26 commits into from
Jan 22, 2021

Conversation

eugene-kulak
Copy link
Contributor

@eugene-kulak eugene-kulak commented Jan 18, 2021

closes #1682

What

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

How

Describe the solution

Pre-merge Checklist

  • Run integration tests
  • Publish Docker images

Recommended reading order

  1. test.java
  2. component.ts
  3. the rest

Tested scenarios

  • sync each stream with incremental/full method
  • sync stream with incremental method and state.json file

@eugene-kulak eugene-kulak changed the title WIP: Source FB Marketing: add incremental support Source FB Marketing: add incremental support Jan 19, 2021
* Gender & Age
* Platform & Device
* Region
* Country - _comming soon_
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Country - _comming soon_
* Country - _coming soon_

for each

@@ -21,11 +21,6 @@
"type": "string",
"description": "The value of the access token generated. See the <a href=\"https://docs.airbyte.io/integrations/sources/facebook-marketing\">docs</a> for more information",
"airbyte_secret": true
},
"include_deleted": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't work yet, there is a ticket to add deleted records



#
# class AdsInsightAPI(IncrementalStreamAPI):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment for why this is disabled in the code?

@jrhizor
Copy link
Contributor

jrhizor commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/502771049
❌ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/502771049

Copy link
Contributor

@jrhizor jrhizor left a comment

Choose a reason for hiding this comment

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

Generally looks good.

The integration test is failing. Once that's fixed please leave a comment and I'll take another look.

@eugene-kulak
Copy link
Contributor Author

eugene-kulak commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504210782
❌ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504210782

@eugene-kulak
Copy link
Contributor Author

@jrhizor please continue

Test run finished after 81748 ms
[         2 containers found      ]
[         0 containers skipped    ]
[         2 containers started    ]
[         0 containers aborted    ]
[         2 containers successful ]
[         0 containers failed     ]
[         7 tests found           ]
[         0 tests skipped         ]
[         7 tests started         ]
[         0 tests aborted         ]
[         7 tests successful      ]
[         0 tests failed          ]

api_mock = Mock()
api_mock.account.get_ad_creatives.return_value = [1, 2, 3]

api = AdCreativeAPI(api=api_mock)
Copy link
Contributor

Choose a reason for hiding this comment

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

Flake8 is failing to lint this due to:

[python] .venv/bin/python -m flake8 . --config /home/runner/work/airbyte/airbyte/tools/python/.flake8 |  
-- | --
  | ./unit_tests/test_api.py:42:9: F841 local variable 'api' is assigned to but never used |  
  | ./unit_tests/test_api.py:45:9: F821 undefined name 'api' |  
  | ./unit_tests/test_api.py:48:9: F821 undefined name 'api'

@eugene-kulak eugene-kulak force-pushed the keu/source-facebook-marketing-incremental branch from ae4dd57 to 219b11a Compare January 22, 2021 19:30
@eugene-kulak
Copy link
Contributor Author

@jrhizor I had to do force push because one commit from source-file PR was added in this PR by accident

@eugene-kulak
Copy link
Contributor Author

eugene-kulak commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504604817
❌ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504604817

@eugene-kulak
Copy link
Contributor Author

eugene-kulak commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504627662
❌ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504627662

@eugene-kulak
Copy link
Contributor Author

eugene-kulak commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504655813
❌ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504655813

@sherifnada sherifnada linked an issue Jan 22, 2021 that may be closed by this pull request
3 tasks
@eugene-kulak
Copy link
Contributor Author

eugene-kulak commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504800914
✅ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504800914

@sherifnada
Copy link
Contributor

sherifnada commented Jan 22, 2021

/test connector=source-facebook-marketing

🕑 source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504803833
✅ source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/504803833

@sherifnada sherifnada merged commit 9b09994 into master Jan 22, 2021
@sherifnada sherifnada deleted the keu/source-facebook-marketing-incremental branch January 22, 2021 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken links in FB docs Source Facebook Marketing: Add incremental update
4 participants