[BREAKING] feat: route data retrieval through lumid-data-app via type:lumid (sql/s3/agent)#67
Open
timzsu wants to merge 3 commits into
Open
[BREAKING] feat: route data retrieval through lumid-data-app via type:lumid (sql/s3/agent)#67timzsu wants to merge 3 commits into
timzsu wants to merge 3 commits into
Conversation
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
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.
Purpose
Unify FlowMesh's data retrieval on a single connector that talks to lumid-data-app over HTTP. A new
type: lumidretrieval (withmode: sql | s3 | agent) covers all three patterns through oneLumidDataConnector, so the Postgres and S3 connectors can be retired later. Replaces the oldtype: agentpath (which imported thelumid_dataSDK).Results are never returned inline: each lumid node materializes to object storage and the executor surfaces a pointer (
materialized_uriunder/blobs/) plus theaccess_chain.Changes
src/worker/connectors/lumid_data_connector.py(new) —LumidDataConnector(httpx) with three modes:sql→POST /retrieve,agent→POST /agent/v1(buffered SSE),object→GET /blobs/<key>; pluslist_objectsviaGET /blobs. Forwardslumid_data_tokenas the bearer.src/worker/connectors/agent_connector.py(deleted) and__init__.py—AgentConnector→LumidDataConnector.src/worker/executors/data_retrieval_executor.py— new_run_lumid(sql/s3/agent),_run_agentremoved;lumid_data_tokenis a required field on lumid nodes.pyproject.toml,uv.lock,src/worker/requirements/requirements.txt— drop thelumid-data-sdkdependency (relocked + regenerated).examples/templates/data_retrieval.yaml(new) — one example covering all three modes + a downstream node consumingaccess_chain; replacesdata_retrieval_agent.yamlanddata_retrieval_then_inference.yaml(removed).tests/worker/test_lumid_data_connector.py(replacestest_agent_connector.py) — respx-mocked connector + executor-branch coverage.docs/EXECUTORS.md,docs/WORKFLOWS.md,docs/ENV.md— documenttype: lumid, the requiredlumid_data_token, and remove the obsoleteLUMID_DATA_TOKENworker env.type: sqlandtype: s3(the connection-string connectors) are unchanged — they will retire after the lumid path becomes stable.Design
lumid-data-app exposes one auth-gated surface:
POST /retrieve({sql}or{plan}),GET /blobs?prefix=&delimiter=/GET /blobs/<key>, andPOST /agent/v1. The connector maps each retrieval mode onto it and forwardslumid_data_tokenas the bearer — all systems share lum.id auth, so this is the caller's PAT (or a local dev key from lumid-data-app'sLUMID_API_KEYS). The token is a required per-node spec field; FlowMesh does not inject or default it. Responses are pointer-based (no inline rows), matching theRetrievalResultcontract.Test Plan
Full-stack e2e against a live lumid-data-app with demo data:
Test Result
Migration (breaking)
type: agentis removed → usetype: lumidwithmode: agent.type: lumidnode now requireslumid_data_token(set to your lum.id PAT, or a local dev key).lumid-data-sdkdependency is gone; the worker reaches lumid-data-app over HTTP.Pre-submission Checklist
pre-commit run --all-filesand fixed any issues.uv run pytest tests/passes locally.[BREAKING]and described migration steps above.