[BUG] Deleted Request Variables are stilling being used
Deleted Request Variables are stilling being used in the request.
Steps to reproduce:
- Create new a new collection
- Create new "GET" Request with variable in path: https://run.mocky.io/{{version}}/3561f32c-66a5-44d9-9c2f-7398b118468a
- Go to the "Vars" tab in this request and send the request
- Add the var with the name "version" and value "v3"
- Send request and check the "Timeline" tab to verify "v3" is used for "version" in the path
- Go to the "Vars" tab and delete the "version" var
- Send request
- For the result go to the "Timeline" tab: After deleting the var "version" from the "Vars" tab, it is still used in the request.
Just my 2 cents: a clean solution could be to implement the delete as: deactivate + delete.
@epestela how about one step at a time with the current quality? Pull request for activate/deactivate ist already open: #1101
@peerb I agree and I might have not bean clear in my previous comment. I did not mean to ask to fix both cases together. I meant to use the disable feature for the (future) delete fix
- on delete request
- disable the variable
- remove the variable
but it was just a suggestion
@epestela thanks for clarifying. No it is understood, but this would be the case if the var would delete.
Entire request context should be cleared between calls. If you create a variable using a script and then you don't create it on your next run of that same script (because you changed the script), the variable is still there.
https://github.com/usebruno/bruno/assets/33555533/09a9c42a-2e5a-4add-bf52-5874e6201456
@DT209 thank you for the input. This is already addressed in #1539 and the pull request is waiting for approval.
The Request variables - in the Vars Tab are supposed to be scoped only under the context of request execution.
Before v1.20.2 the request variables were being persisted and were getting leaked into the global scope. This was a bug and it has been fixed in the latest release.
We have also added support for Folder Level Variables which gets applied to all requests under the folder.