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 Linkedin Ads: connector assumes that api page with size smaller than maximum page size is last page #34164

Open
1 task done
FVidalCarneiro opened this issue Jan 11, 2024 · 2 comments

Comments

@FVidalCarneiro
Copy link
Contributor

Connector Name

LinkedIn Ads

Connector Version

0.6.4

What step the error happened?

During the sync

Relevant information

We are facing an issue with the Linkedin Ads connector regarding the creatives endpoint. As you can identify in the associated pull request, currently, the Linkedin Ads connector assumes that it is ingesting the last Linkedin creatives API page when the number of records returned by the API is smaller than the maximum size of the page, in this case, 100 elements/records. This is a reasonable assumption, if all creatives are returned by the API per page. In our case, we have identified a rare, but possible BUG with some Linkedin creatives that are broken and cannot be deleted (we are in contact with the Linkedin Technical support team to understand the potential source of such bug). In our case, we have one creative that suffers from such a BUG, and as a consequence, the second page of the creatives API response (which should contain this creative), responds with 99 elements instead of 100. As a consequence, for the LinkedIn Ads account containing the bugged creative, airbyte assumes this is the last page and stops making calls. However, in our case, there were 4 more pages to consume. The consequence is that we have a lot of missing creatives. Below, we show you the equivalent postman API call that returns only 99 records (notice through the url that this is only the second page and that the total number of elements is 599).

linkedin-api-call

Below a screenshot of what a broken Linkedin creative looks like from the UI.

broken-creative

Our solution is therefore to change the criteria of when to stop requesting next page from Linkedin API. Instead of stopping when the number of records returned from an API page is the smaller than the total allowed, we stop when an API call returned no records. We are aware that this would imply one useless extra API call per Linkedin Account, but avoid the above mentioned issue and making the connector more robust.

Relevant log output

No response

Contribute

  • Yes, I want to contribute
@FVidalCarneiro FVidalCarneiro added area/connectors Connector related issues needs-triage type/bug Something isn't working labels Jan 11, 2024
@FVidalCarneiro FVidalCarneiro changed the title Source Linkedin Ads: connector assumes that api page with size smaller than maximum page size is last page 🐛 Source Linkedin Ads: connector assumes that api page with size smaller than maximum page size is last page Jan 11, 2024
@FVidalCarneiro
Copy link
Contributor Author

Attempted resolution in related PR - #34166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants