Skip to content

chore(source-facebook-marketing): migrate to api v23 - #65533

Merged
David Gold (dbgold17) merged 13 commits into
masterfrom
dbgold17/source-facebook-marketing-API-deprecation
Aug 27, 2025
Merged

David Gold (dbgold17) merged 13 commits into
masterfrom
dbgold17/source-facebook-marketing-API-deprecation

Conversation

@dbgold17

@dbgold17 David Gold (dbgold17) commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

What

Closes: https://github.com/airbytehq/airbyte-internal-issues/issues/13967

  • updates to use facebook-business 23.0.0 (Facebook Marketing API v23)
  • migrates three fields to new names (docs link):
    • instagram_actor_id replace by instagram_user_id
    • effective_instagram_story_id replace by effective_instagram_media_id
    • instagram_story_id replace by source_instagram_media_id
  • updates schema for ad_insight_breakdowns to include new options (docs link)
    • ad_extension_domain
    • ad_extension_url
    • breakdown_ad_objective
    • comscore_market
    • comscore_market_code
    • creative_relaxation_asset_type
    • flexible_format_asset_type
    • gen_ai_asset_type
    • impression_view_time_advertiser_hour_v2
    • is_auto_advance

How

I iterated until unit tests were passing and then attempted to runs some syncs using sandbox credentials. Regression test and ensure no issues are found

User Impact

yes, this is a breaking change. Migration steps are detailed in the PR

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@github-actions

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).
  • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
  • /poe source example lock - Alias for /poe connector source-example lock.
  • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
  • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.

📝 Edit this welcome message.

@dbgold17

David Gold (dbgold17) commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor Author

/bump-version changelog="Migrate to API v23"

Bump Version job started... Check job output.

✅ Changes applied successfully. (4ac94dc)

@pnilan Patrick Nilan (pnilan) left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to mark this as a breaking change in the metadata file and also include an entry in the migration doc (same directory as all other connector docs).

metadata.yaml

  • major version bump under dockerImageTag
  • Add entry under breakingChanges
  • Include upgrade deadline of the day before the deprecation date
  • It looks like the proposed change is only breaking for ad_creatives so we set a breaking change scope appropriately, there are already examples in the metadata file.

facebook-marketing-migrations.md

  • Add a breaking change entry (there are example in there already)

Also, just to confirm: when running a diff between the two output specs, were there any removed fields/options? If not we're all good. If there were removed options for a given field, I'm inclined to think it might also be breaking. Although that would require more understanding of the connector and its spec. If it's decided that the change to the spec is breaking, then we would need to document that in the breakingChanges entry and remove the scoped impact since it would presumably impact all users of the connector.

@github-actions

github-actions Bot commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

source-facebook-marketing Connector Test Results

258 tests   254 ✅  13s ⏱️
  2 suites    4 💤
  2 files      0 ❌

Results for commit 3229770.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

Deploy preview for airbyte-docs ready!

✅ Preview
https://airbyte-docs-kgpm1djjf-airbyte-growth.vercel.app

Built with commit 3229770.
This pull request is being automatically deployed with vercel-action

@dbgold17

Copy link
Copy Markdown
Contributor Author

Patrick Nilan (@pnilan)

Also, just to confirm: when running a diff between the two output specs, were there any removed fields/options? If not we're all good. If there were removed options for a given field, I'm inclined to think it might also be breaking. Although that would require more understanding of the connector and its spec. If it's decided that the change to the spec is breaking, then we would need to document that in the breakingChanges entry and remove the scoped impact since it would presumably impact all users of the connector.

That's correct, only added fields/options.

I also ran CATs for good measure and the only failure was comparing the spec outputs. I updated the new spec output in airbyte-integrations/connectors/source-facebook-marketing/integration_tests/spec.json

@dbgold17
David Gold (dbgold17) requested a review from a team as a code owner August 25, 2025 22:55

@pnilan Patrick Nilan (pnilan) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes are only around noting the removal of instagram_story_id field, too.

Three fields from the `AdCreatives` stream have been deprecated:
- `instagram_actor_id` -> `instagram_user_id`
- `effective_instagram_story_id` -> `effective_instagram_media_id`
- `instagram_story_id` -> `source_instagram_media_id`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also should note that instagram_story_id has been removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That was what I was attempting to communicate with this line. Happy to be more explicit.

I believe all three of these fields are going away or is there something special about instagram_story_id?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah sorry see me note here: https://github.com/airbytehq/airbyte/pull/65533/files#r2299384503

I don't see source_instagram_media_id in the updated schema

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would you like me to reword this or is what I have okay?


See the [v22.0 changelog](https://developers.facebook.com/docs/marketing-api/marketing-api-changelog/version22.0) for more information

### Steps to refresh the AdCreatives stream schema:

@dbgold17 David Gold (dbgold17) Aug 25, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Patrick Nilan (@pnilan) I copied these steps from other migration guides. Is this still accurate? What would be a good way for me to validate?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah still accurate!

"description": "Permalink URL of the ad creative on Instagram.",
"type": ["null", "string"]
},
"instagram_story_id": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not seeing "source_instagram_media_id" in the updated schema.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

correct, it is being replace by source_instagram_media_id, just as instagram_actor_id is being replaced with instagram_user_id.

The only reason the diff looks different is because source_instagram_media_id already existed in the schema here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah got it! Thanks for that link.

@pnilan Patrick Nilan (pnilan) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good nice work

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.

3 participants