Skip to content

feat(source-tiktok-marketing): Migrate to manifest-only #61580

Merged
brianjlai merged 6 commits intomasterfrom
brian/tiktok_marketing_manifest_only
Jun 16, 2025
Merged

feat(source-tiktok-marketing): Migrate to manifest-only #61580
brianjlai merged 6 commits intomasterfrom
brian/tiktok_marketing_manifest_only

Conversation

@brianjlai
Copy link
Contributor

Resolves: https://github.com/airbytehq/airbyte-internal-issues/issues/13282

What

Migrates source-tiktok-marketing to manifest-only so that it can be edited in builder

How

Standard process for removing unneeded files, fixing unit/integration test suite, and modifying the manifest

The main change to note is that this is the first use of the new ConditionalStreams component which reads in the config to determine whether certain streams should be available to users. There are 28 streams that should always be shown regardless of environment and 16 streams that are only available to prod account environments

Testing Plan:

I built a dev image and ran our test accounts for both discover and read to validate existing behavior

I will run regression tests and identify 3 high volume candidates to test and validate behavior

Will be included in a progressive rollout

Review guide

The main focus is the ConditionalStreams block of the manifest to make sure there is parity with the existing implementation.

User Impact

n/a

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@vercel
Copy link

vercel bot commented Jun 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 2:51am

@github-actions
Copy link
Contributor

👋 Greetings, Contributor!

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).

📝 Edit this welcome message.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2025

source-tiktok-marketing Connector Test Results

69 tests   56 ✅  4h 45m 49s ⏱️
 2 suites  11 💤
 2 files     2 ❌

For more details on these failures, see this check.

Results for commit 0342bb3.

♻️ This comment has been updated with latest results.

@dbgold17
Copy link
Contributor

@brianjlai I'm happy to sit down with you tomorrow to review if we have time but I don't know what I should be looking for in here.

Copy link
Contributor

@pnilan pnilan left a comment

Choose a reason for hiding this comment

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

Looks good. Have one non-blocking comment assuming tests run fine and all.

import pytest
from source_tiktok_marketing import SourceTiktokMarketing
from source_tiktok_marketing.components.advertiser_ids_partition_router import (
from components import (
Copy link
Contributor

Choose a reason for hiding this comment

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

@brianjlai I usually import the manifest_only_fixtures to access the components -- but now I'm wondering if that is even necessary.

i.e. in conftest.py

pytest_plugins = ["airbyte_cdk.test.utils.manifest_only_fixtures"]

@ChristoGrab Can you remind me the benefit of importing the fixtures?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, i forgot to add that. That is the command I also used in conftest.py for zendesk, but forgot to add. Might be why my CI checks are failing, but think we're all on the same page. Thanks for the catch and will add

- $ref: "#/definitions/creative_assets_portfolios_stream"
- $ref: "#/definitions/creative_assets_videos_stream"
# The following streams are only included if the config is not using a sandbox account for authentication
- type: ConditionalStreams
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

@brianjlai
Copy link
Contributor Author

brianjlai commented Jun 16, 2025

Regression test results:

Auto run w/ various connections:
https://github.com/airbytehq/airbyte/actions/runs/15670827408

tiktok_marketing_regression_tests_01 tiktok_marketing_regression_tests_02
  • All streams match except for 1 creative_assets_music. This was odd because the manifest-only change shouldn't have had much if any affect on any 1 stream. See the next result for more analysis
  • There are a lot of mismatches reported for the catalog. However, this is expected because the current regression test framework only performs comparison of each catalog list assuming the same order
  • This is due to the order changing because of how we're putting all prod-only streams behind a conditional block which as affected the order. I did spot checking advertisers_id, ad_group_audience_reports_by_country_daily, and advertisers_reports_hourly, they all matched as well as the count. So the regression test does a strict comparison of order which is not important

Specific test run for additional validation:
https://github.com/airbytehq/airbyte/actions/runs/15670844166

tiktok_marketing_regression_tests_2nd_run
  • Confirming the above mismatch creative_assets_music which matched. This should confirm that this was a regression test framework issue
  • Everything else matches

Local Testing

One final note on testing, because of the impact to how we make available connections based on the config, I've also tested this as a dev version on Cloud and confirmed, there are 44 streams on OAuth creds and 28 streams on sandbox creds which is expected.

Prod Discover (see advertiser_ids which is prod only):

prod_discover

Sandbox Discover:

sandbox_discover

This should be ready to enter progressive rollout

@brianjlai
Copy link
Contributor Author

brianjlai commented Jun 16, 2025

/approve-regression-tests see above message

Check job output.

✅ Approving regression tests

@brianjlai
Copy link
Contributor Author

one note on the CI checks, I'm not sure why we're all of a sudden having some weird things related to rate limiting or request errors, but given that the manifest-only migration did not change any part of the implementation beyond which streams are made available (not any change to the stream's sync behavior), this might be a test creds issue since regression and local testing passed.

@brianjlai brianjlai merged commit a798fc6 into master Jun 16, 2025
33 of 39 checks passed
@brianjlai brianjlai deleted the brian/tiktok_marketing_manifest_only branch June 16, 2025 22:04
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.

4 participants