acoustic-carpenter-78188
03/02/2026, 9:53 PMraw_data_path attribute to the AppContext dataclass and exposed it via the ctx() function, allowing apps to access the raw data path. Also implemented the set_raw_data_path() function to set this value and propagate it via environment variables for thread safety. (src/flyte/app/_context.py)
• Updated the serving context (_Serve) and its factory function (with_servecontext) to accept and propagate the raw_data_path parameter, defaulting to /tmp/flyte/raw_data for local mode. The serving logic ensures the raw data path is set in the correct thread context for request handlers. (src/flyte/_serve.py)* Extended the CLI (serve.py) to accept a --raw-data-path option and set the raw data path in the app context when provided. (src/flyte/_bin/serve.py)
• Ensured that the container command for remote serving includes a template variable for the raw data path, allowing the backend to substitute the correct value at runtime. (src/flyte/app/_app_environment.py)
Documentation and Example
• Added an example FastAPI app (app_with_raw_data_path.py) that demonstrates accessing the raw data path from the app context and returning it in an API response. (examples/apps/app_with_raw_data_path.py)
flyteorg/flyte-sdkacoustic-carpenter-78188
03/30/2026, 8:04 PM