serverless-vscode icon indicating copy to clipboard operation
serverless-vscode copied to clipboard

When deploying function, the environment variables are overwritten.

Open copyrighthero opened this issue 3 years ago • 1 comments

Describe the bug When deploying the function through the VSCode plugin, the remote environment variables are cleared and overwritten.

To Reproduce Steps to reproduce the behavior:

  1. Click Deploy button on the VSCode plugin for the functions;
  2. Go to your console, check the corresponding functions' settings;
  3. See that previous environment variables were replaced by the following:
    {"LD_LIBRARY_PATH":"/code/.fun/root/usr/local/lib:/code/.fun/root/usr/lib:/code/.fun/root/usr/lib/x86_64-linux-gnu:/code/.fun/root/usr/lib64:/code/.fun/root/lib:/code/.fun/root/lib/x86_64-linux-gnu:/code/.fun/root/python/lib/python2.7/site-packages:/code/.fun/root/python/lib/python3.6/site-packages:/code:/code/lib:/usr/local/lib","NODE_PATH":"/code/node_modules:/usr/local/lib/node_modules","PATH":"/code/.fun/root/usr/local/bin:/code/.fun/root/usr/local/sbin:/code/.fun/root/usr/bin:/code/.fun/root/usr/sbin:/code/.fun/root/sbin:/code/.fun/root/bin:/code:/code/node_modules/.bin:/code/.fun/python/bin:/code/.fun/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin","PYTHONUSERBASE":"/code/.fun/python"}
    

Expected behavior The previously set env vars should persist, these run-time related env vars should not have replaced and cleared previous ones.

Screenshots ~~If applicable, add screenshots to help explain your problem.~~

Desktop (please complete the following information):

  • OS: macOS BigSur 11.4
  • VSCode Version: 1.58.2
  • Aliyun Serverless Extension Version: 1.27.17

copyrighthero avatar Jul 17 '21 01:07 copyrighthero

@copyrighthero 这个bug什么时候能解决啊?

shengxq avatar Dec 31 '21 02:12 shengxq