mirror of
https://github.com/open-webui/oikb.git
synced 2026-11-05 01:27:25 +00:00
[GH-ISSUE #127] Webhook triggers only one knowledge base when one repository is split across several #73
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/oikb#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @etho201 on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/open-webui/oikb/issues/127
Summary
When a single repository is split across multiple knowledge bases — the pattern
documented under Splitting Sources Across KBs in
docs/guide.md— a pushwebhook syncs only one of them. The others wait for their scheduled interval.
Expected
A push triggers a sync for every affected source, or at minimum every entry
carrying
webhook: true.Actual
Exactly one entry syncs. Which one depends on its position in
sources:.Reproduction
.oikb.yaml:Daemon startup:
Push to the repository. One sync runs against
<kb-1>; the other five knowledgebases stay stale until their interval elapses.
Adding
webhook: trueto every entry does not change this.Cause
src/oikb/webhooks.pyreturns on the first match:_run_entry_lockedthen narrows further to a single knowledge base:All entries here share the same
sourcestring, somatch in sourceis true forevery one — but the loop returns the first and never reaches the rest.
Impact
The documented Splitting Sources Across KBs workflow has no working
push-trigger path. Affected users must either poll on a short interval or run an
external fan-out calling
POST /sync/<name>once per entry.Suggested fixes
Any of these would resolve it:
Fan out to all matching entries. Collect every entry with
webhook: truematching the repo and schedule
_run_entryfor each distinctkb-id._run_entryalready takes a per-KB lock, so overlapping schedules are safe:A top-level
webhooks:section listing which entries a delivery shouldtrigger, so the target set is explicit rather than implied by ordering.
Accept a target in the URL —
/webhooks/github/<entry-name>— allowing onewebhook per entry. GitHub permits multiple webhooks per repository.
Documentation
The Webhooks section and the Splitting Sources Across KBs section of
docs/guide.mdnever reference each other. Regardless of which fix is chosen, asentence noting that one delivery syncs one knowledge base would save others this
debugging.
Environment
ghcr.io/open-webui/oikb:latest, daemon modepath:, withtarget-path:for citation prefixes