Repository navigation
feat(source): compile an Amazon S3 prefix into the local wiki - #277
Open
kalyan-fireweave wants to merge 1 commit into
Open
kalyan-fireweave wants to merge 1 commit into
kalyan-fireweave wants to merge 1 commit into
Conversation
Bindings stay in config and credentials stay in env files, so a remote object can recompile through the existing add path without a new storage backend. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Nov 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #274.
Google Drive (#275) and OneDrive (#276) stay vote cards. This pull request is the S3 ingest path only. It is separate from #61, which asks to store the wiki itself on S3-compatible storage.
A maintainer needs to add the
connector:s3label so the Workbench vote search for unshipped providers can find this issue. This account cannot create labels on VectifyAI/OpenKB.Summary
Problem
The Workbench shows Amazon S3 as a GitHub vote card. There is no way to bring a bucket prefix into the local wiki through the existing compile path.
Fix
openkb source add s3,list,sync, andremove. One binding is one region, bucket, and prefix. An empty prefix is the bucket root.OPENKB_S3_ACCESS_KEY_IDandOPENKB_S3_SECRET_ACCESS_KEY. They are required before the binding is saved. They are never written toconfig.yaml, the wiki, orconnector-state.json.add_single_file. The registry key iss3://{bucket}/{key}. The same key and same bytes are skipped. The same key and new bytes keep the wiki name and recompile. A later file failure keeps the files that already succeeded. Transient HTTP errors are retried 3 times.openkb source removedeletes the binding and leaves compiled pages in place.boto3==1.43.124is the optionals3extra. The core install is unchanged. A missing extra printspip install "openkb[s3]".POST /api/v1/connectors/syncdefaults to non-interactive.Evidence
papers,s3://demo-bucket/papers/, "Not synced since this change", Sync, Remove, and Add another. Google Drive and OneDrive stay "Want it? Vote". Settings, with no knowledge base selected, says "Open a knowledge base to connect Amazon S3." Sync without the extra showspip install "openkb[s3]". Remove clears the binding and leaveswiki/keep.mdin place.config.yamlholds the location only.Verification
Results here: ruff check passed, ruff format check passed, mypy reported no issues in 66 files, pytest 1263 passed.
The web build passed (
i18n:check,tsc -b,vite build). A later label tweak on the S3 card was rechecked withtsc -b.Test plan
uv run ruff check .uv run ruff format --check .uv run mypy openkbuv run pytestcd frontend && npm ci && npm run buildpip install "openkb[s3]", set the twoOPENKB_S3_*keys in<kb>/.env,openkb source add s3,openkb source syncopenkb source removeleaves compiled pages in the wikiconnector:s3labelMerge Danger
Door: two-way
The command, the router, and the card can be reverted. A binding already saved under
connectors:is ignored by a build that does not read it. Pages already compiled stay in the wiki, which is the same result asopenkb source remove.Blast Radius: ingest
Local
openkb addis unchanged:identityis omitted unless a remote object supplies one. The new SDK is an extra, so the core install and CI'suv sync --locked --extra dev --extra apido not install boto3. The lock timeout defaults to the previous blocking acquire; only connector writes use the 30 second bound.Made with Cursor