fix(source-tiktok-marketing): classify transient API errors as transient_error and clarify retry error messages - #84320
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
Co-Authored-By: bot_apk <apk@cognition.ai>
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
|
|
↪️ Triggering Reason: Draft fix with all CI checks green; prove-fix validation is the next pipeline step for: |
|
🧪 AI Prove Fix — in progressStatus: Local runtime evidence gathered. Regression test still running. Devin session: https://app.devin.ai/sessions/c3044b391ba2451083e3af81bf8fb73a Pre-flight checks
Pre-release published: Evidence planHypothesis, proving / disproving criteria, and case rankingWhat the change does. Four duplicated TikTok error handlers (global requester, Critical sequencing constraint. Proving criteria. Disproving criteria. Any ❌ on the target the control does not show — in particular a Comparison baseline. Ranked cases.
Evidence so far — isolated runtime probe against the shipped CDKBecause TikTok codes Manifest validation on CDK 7.24.0 — passesFull The new Resolution of a matching
|
| # | Mode | Credentials | Streams | Result |
|---|---|---|---|---|
| 1 | Comparison vs 5.1.11 |
GSM integration test | all | ⏳ running |
|
What
Resolves https://github.com/airbytehq/oncall/issues/13291:
A customer's sync surfaced this user-facing message after retries were exhausted:
Two problems visible in that string come from this connector's manifest: the retry-phase
error_messagenarrates behavior ("The connector will retry automatically") that is false by the time the message is emitted, and it appends TikTok's opaque vendor text verbatim via{{ response.get('message', '') }}. Separately, the failure surfaced assystem_error, although TikTok documents return codes beginning with5as service errors — so these belong ontransient_error.Requested by the oncall AI-fix workflow on issue 13291.
How
For the in-body-code RETRY filters (
60001,50000,51041,51004) this:failure_type: transient_error, anderror_messageto one deterministic sentence naming the condition and code, with no behavioral narration, no remediation, and no vendor interpolation.Those four filters are duplicated across four error handlers in
manifest.yaml(global requester,report_daily_error_handler, and two inline pixel-stream handlers). All 16 are updated identically, so a given code's message is stable enough to use as a log-aggregation key.The
40100RATE_LIMITED,40002IGNORE,40067config-error, and catch-all FAIL filters are untouched.Sequencing
The
failure_typedeclarations only take effect once asource-declarative-manifestbase image ships the CDK-side fix (airbytehq/airbyte-python-cdk#1115), which makesHttpResponseFilterhonor a declaredfailure_typefor retry-style actions instead of onlyFAIL. Until then the declarations are inert but harmless; the reworded strings improve the message as soon as this version is released.Declarative-First Evaluation
Declarative approach only — no custom Python component. The existing
HttpResponseFilterconfiguration already supports bothfailure_typeanderror_message, so this is a YAML-only change to values on filters that already exist.Test Coverage
Added parametrized manifest-inspection tests in
unit_tests/test_report_date_step.py(following the existingtest_error_40067_*pattern) covering each of the four codes at each of the four handler locations: action isRETRY,failure_typeistransient_error, the message matches exactly and contains no{{interpolation or banned narration phrases, and a given code's message is identical across all four handlers. They fail on the pre-fix manifest (nofailure_typekey, old strings) and pass after.poetry run pytest . -xfromunit_tests/: 78 passed.pre-commit run --files <changed>: clean. (The connector is manifest-only, so there is no connector-root Poetry project and nopyproject.tomlversion to bump.)Breaking change evaluation
Not breaking. No spec, schema, primary key, cursor, stream, or state change, and no change to which records are returned — only the classification and wording of an error that already fails the sync. Version bumped to
5.1.12-rc.1(enableProgressiveRollout: true).User Impact
Retry-exhaustion failures on these TikTok service errors read as a single clear sentence instead of replaying retry narration and vendor text, and (once a base image carries the CDK fix) are classified
transient_errorrather thansystem_error, which also corrects connector-health and oncall signal.Can this PR be safely reverted and rolled back?
Link to Devin session: https://app.devin.ai/sessions/052578ae518045c88abdfe6311014bc7