langflow-ai / langflow

⛓️ Langflow is a dynamic graph where each node is an executable unit. Its modular and interactive design fosters rapid experimentation and prototyping, pushing hard on the limits of creativity.
http://www.langflow.org
MIT License
17.87k stars 2.68k forks source link

prerelease update from v1.0.0a24 to v1.0.0a27 fails to migrate flows #1790

Open suggsadc opened 2 weeks ago

suggsadc commented 2 weeks ago

Describe the bug Missing logins and flows after Langflow pre-release update

Browser and Version Migration from v1.0.0a24 to v1.0.0a27

To Reproduce Steps to reproduce the behavior:

  1. With v1.0.0a24 already installed I ran pip install langflow -U --pre in-order to update to v1.0.0a27
  2. With langflow running i was unable to log in with any custom account previously created and admin account had no previously created flows

Additional context Honestly, I chalked it up to expected and intended behavior for a pre-release. However, I did see several references in the the langflow-pre.db logs to failed row entries that i thought i would bring to your attention:

Example failed DB add_row_to_table

{
    "text": "2024-04-26 17:13:43 - ERROR    - utils - flow_id: <class 'str'>\n",
    "record": {
        "elapsed": {
            "repr": "4:42:17.131169",
            "seconds": 16937.131169
        },
        "exception": null,
        "extra": {},
        "file": {
            "name": "utils.py",
            "path": "C:\\Users\\HPZWS1\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\langflow\\services\\monitor\\utils.py"
        },
        "function": "add_row_to_table",
        "level": {
            "icon": "❌",
            "name": "ERROR",
            "no": 40
        },
        "line": 105,
        "message": "flow_id: <class 'str'>",
        "module": "utils",
        "name": "langflow.services.monitor.utils",
        "process": {
            "id": 9648,
            "name": "MainProcess"
        },
        "thread": {
            "id": 15840,
            "name": "MainThread"
        },
        "time": {
            "repr": "2024-04-26 17:13:43.608861-05:00",
            "timestamp": 1714169623.608861
        }
    }
}
suggsadc commented 2 weeks ago

Attaching log for reference...

langflow.log

ogabrielluiz commented 2 weeks ago

Hey @suggsadc

Thanks!

The monitor service uses a different database. There are no migrations on it yet and we delete the table every time we make changes to it.

I've added better logging on tihs so we can have a clearer picture on what is really causing this.

suggsadc commented 2 weeks ago

rock on... continue on with your awesomeness!

ogabrielluiz commented 2 weeks ago

Could you update it and see if there's any more info on this issue?

Were you saving messages to the Chat Memory or were you simply using Langflow when this happened?

suggsadc commented 2 weeks ago

@ogabrielluiz

I migrated from v1.0.0a26 to v1.0.0a28 without issue (users, flows, components all were maintained) and no errors in log. I assume this issue to be resolved. thank you!

answer to your question I was not using langflow at the time of the log file errors from before. My apologies, but my ignorance of langflow DB may have caused some confusion. I assumed the log file errors i was seeing were related to the fact that after a prerelease update i no longer had any users or flows. All flows i had before the update were gone and all users i had created were also gone.

You were correct to point out to me that the logs reference the "monitor" utility and most likely not related to missing flows and user after my update.