Skip to content
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

Refactor base.py and Dockerfile, and folder column migration #2002

Merged
merged 7 commits into from
May 28, 2024

Conversation

ogabrielluiz
Copy link
Contributor

This pull request includes several changes to improve the codebase and functionality of the application.

The first commit refactors the base.py file to handle ImportError when importing the is_pre_release function from the langflow.version module. This prevents the application from crashing when the module is not available. Additionally, the commit adds dynamic determination of whether the version is a pre-release version by checking for 'a', 'b', or 'rc' in the version number.

The second commit fixes a missing backslash in the Dockerfile, ensuring proper chaining of commands.

The third commit updates the Dockerfiles to include the creation of a user with UID 1000 and the necessary permissions for the /app/langflow directory. It also adds the user's local bin directory to the PATH environment variable, improving security and isolation within the container.

The fourth commit adds the folder_id column to the flow table in the database and handles the migration of the folder column to the new folder_id column. This change allows for better organization and management of flows within folders.

Please review and merge these changes as appropriate.

…unction from langflow.version module to prevent crashing the application

feat(base.py): dynamically determine if the version is a pre-release version by checking for 'a', 'b', or 'rc' in the version number
…mically determine the version number

The get_lifespan function in main.py has been updated to handle ImportError when importing the __version__ attribute from the langflow.version module. If the import fails, the version number is dynamically determined using the importlib.metadata.version function. This change ensures that the application does not crash when the langflow.version module is not available.

Note: This commit message follows the convention used in the recent user commits.
… migration

This commit adds the folder_id column to the flow table in the database. It also handles the migration of the folder column to the new folder_id column. This change allows for better organization and management of flows within folders.

Note: This commit message follows the convention used in the recent user commits.
… variable

This commit updates the Dockerfiles to include the creation of a user with UID 1000 and the necessary permissions for the /app/langflow directory. It also adds the user's local bin directory to the PATH environment variable. This change improves the security and isolation of the application within the container.

Note: This commit message follows the convention used in the recent user commits.
Copy link

vercel bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 9:24pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working python Pull requests that update Python code labels May 28, 2024
@ogabrielluiz ogabrielluiz merged commit 482ac3f into dev May 28, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests that update Python code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant