You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating the name of a global variable (not its value), references to that global variable in existing projects exhibit inconsistent behavior depending on the type of field the variable is referenced in.
Reproduction
Go to Settings > Global Variables and create a variable with name VARIABLE1 and some value. (Variable type doesn't matter; the bug affects both Generic and Credential type variables.)
Create a new project and add an instance of the OpenAI model component.
Add the VARIABLE1 global attribute to both the Input and OpenAI API Key fields.
Go back to Settings > Global Variables and change the name from VARIABLE1 --> VARIABLE2.
Go back to your project and inspect the component. Notice that the Input field still references VARIABLE1, and the OpenAI API Key field is empty.
Navigate away from the project (e.g. go to the dashboard), and then go back to the project again. Notice that both fields are now empty.
Expected behavior
I expected one of two things to happen:
Both fields to be empty. OR
Both fields to update to the new name.
So the only thing I can concretely say is a bug is the old variable name sticking around in the Input field. However, I think serious consideration should be given to number 2. It doesn't make much sense to me that you're allowed to change the name of a global variable if that action removes it from all your existing projects. That's effectively the same behavior as deleting the global variable. (Though, I guess you could could make an argument that it still allows you to persist a secret within Langflow without having to re-add it.)
Bug Description
After updating the name of a global variable (not its value), references to that global variable in existing projects exhibit inconsistent behavior depending on the type of field the variable is referenced in.
Reproduction
VARIABLE1
and some value. (Variable type doesn't matter; the bug affects both Generic and Credential type variables.)VARIABLE1
global attribute to both the Input and OpenAI API Key fields.-->VARIABLE1
VARIABLE2
.VARIABLE1
, and the OpenAI API Key field is empty.Expected behavior
I expected one of two things to happen:
OR
So the only thing I can concretely say is a bug is the old variable name sticking around in the Input field. However, I think serious consideration should be given to number 2. It doesn't make much sense to me that you're allowed to change the name of a global variable if that action removes it from all your existing projects. That's effectively the same behavior as deleting the global variable. (Though, I guess you could could make an argument that it still allows you to persist a secret within Langflow without having to re-add it.)
Who can help?
@anovazzi1, @Cristhianzl, @lucaseduoli
Operating System
macOS 14.7, Docker
Langflow Version
1.0.19
Python Version
3.11
Screenshot
inconsistent-global-variable-behavior.mp4
Flow File
No response
The text was updated successfully, but these errors were encountered: