-
Notifications
You must be signed in to change notification settings - Fork 8.2k
fix: Write alembic logs to config_dir instead of read-only package directory #11161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: Write alembic logs to config_dir instead of read-only package directory #11161
Conversation
…rectory Fixes langflow-ai#11143 - Langflow backend crashes on Kubernetes when the package installation directory is read-only. Problem: The alembic migration log file was written to langflow_dir (the package installation directory), which is read-only in containerized environments following security best practices. Solution: Use config_dir instead of langflow_dir for the alembic log file. config_dir defaults to ~/.cache/langflow/langflow and is user-configurable via LANGFLOW_CONFIG_DIR environment variable. This is consistent with how other writable data (storage, cache, database) is already handled in the codebase.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughUpdated the alembic log file path resolution in the database service to write logs to a writable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 3 warnings, 1 inconclusive)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #11143 - Langflow backend crashes on Kubernetes when the package installation directory is read-only.
Problem
The alembic migration log file was written to
langflow_dir(the package installation directory), which is read-only in containerized environments following security best practices.Error:
[Errno 30] Read-only file system: '.../langflow/alembic/alembic.log'Root Cause
In
DatabaseService.__init__(), relativealembic_log_filepaths were resolved againstlangflow_dir: