Skip to content

fix(convex): stop retrying a deleted table and explain it - #91365

Open
Gilbert09 wants to merge 1 commit into
masterfrom
posthog/convex-missing-table-404-non-retryable
Open

fix(convex): stop retrying a deleted table and explain it#91365
Gilbert09 wants to merge 1 commit into
masterfrom
posthog/convex-missing-table-404-non-retryable

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

A Convex sync whose table was deleted on the source retried the same failing request on every schedule and showed the customer raw driver text they could not act on. The error never reached triage, because it is caught before it becomes an exception.

A sync only calls list_snapshot / document_deltas. Convex answers those with a 404 when a table that schema discovery listed no longer exists at read time: it was deleted on the source, or it is a component table that streaming export does not serve. The 404 was unclassified, so it retried and stored the bare 404 ... for url: <deployment host> string as latest_error.

Changes

  • A missing Convex table now fails fast with "PostHog couldn't find this table in your Convex deployment...", instead of retrying every run and showing raw driver text.
  • Classify 404 Client Error as non-retryable in the Convex source. Cloudflare surfaces transient edge problems as the 52x/530 family, which retry separately, so a 404 is never a transient blip this could disable a sync over.
  • Mechanical: two test cases assert the 404 is classified non-retryable and surfaces the actionable message.

How did you test this code?

Ran the Convex source tests (convex/tests/test_convex.py). Added a test_known_errors_match case for the missing-table 404 and test_missing_table_404_surfaces_actionable_message, which catches a revert of this bucket to a raw or None value. Did not run the full warehouse suite, because this sandbox has no dev stack.

Automatic notifications

  • Publish to changelog?

Docs update

None.

🤖 Agent context

Autonomy: Fully autonomous

Found while triaging a batch of production warehouse sync failure classes. Skills invoked: /writing-user-facing-copy, /writing-tests, /writing-code-comments, /writing-pr-descriptions.

The example named one table in an installed betterAuth component. The fix is intentionally not table- or component-specific, because the next step (turn off syncing for the table) is the same whether the table was deleted or is not served by streaming export. No customer values are in this diff; the test uses an invented deployment host.


Created with PostHog Desktop

A Convex sync only calls list_snapshot / document_deltas, which answer 404 when a
table that schema discovery listed no longer exists at read time. The 404 was
unclassified, so every scheduled run retried it and the customer saw the raw
driver text (which carries the deployment host). Classify it non-retryable with an
actionable message. Cloudflare transients are the 52x/530 family, so a 404 is never
a transient blip this could disable a sync over.

Generated-By: PostHog Desktop
Task-Id: c515c2ae-d0fd-42c5-81fc-44b3650ff0ae
@trunk-io

trunk-io Bot commented Aug 30, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Gilbert09! 👋

It looks like your git author email on this PR isn't your @posthog.com address (owerstom@gmail.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team August 30, 2026 11:02
@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

@Gilbert09 Gilbert09 added the stamphog Request AI approval (no full review) label Aug 30, 2026 — with PostHog
@trunk-io

trunk-io Bot commented Aug 30, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Small, focused fix within the Convex connector by an owning-team author, with tests covering the new behavior; no risky territory (schema, auth, billing, CI, deps) touched.

Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 10L, 1F substantive, 28L/2F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (28L, 2F, single-area, fix)
stamphog 2.0.0b4 .stamphog/policy.yml @ 0131b30 · reviewed head 0131b30

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

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant