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

Add WORKSPACE_NPM_TIMEOUT variable #2758

Open
rstriquer opened this issue Oct 27, 2020 · 1 comment
Open

Add WORKSPACE_NPM_TIMEOUT variable #2758

rstriquer opened this issue Oct 27, 2020 · 1 comment

Comments

@rstriquer
Copy link

Is your feature request related to a problem? Please describe.
I was getting "Response timeout while trying to fetch https://registry.npmjs.org/@vue%2fcli" as I tried to built the workspace, but as far as i saw there should be other trouble points and not only in the workspace container built.

Describe the solution you'd like
Add a workspace .env file timeout. But it could be something more global, I saw a few timeout variables, but nothing global.

Bellow the code I changed to add the timeout:

diff --git a/workspace/Dockerfile b/workspace/Dockerfile
index 6d059ba..9440904 100644
--- a/workspace/Dockerfile
+++ b/workspace/Dockerfile
@@ -678,6 +678,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
         && nvm install ${NODE_VERSION} \
         && nvm use ${NODE_VERSION} \
         && nvm alias ${NODE_VERSION} \
+        && npm config set fetch-retry-maxtimeout 60000 -g \
         && if [ ${NPM_REGISTRY} ]; then \
         npm config set registry ${NPM_REGISTRY} \
         ;fi \

To the final implementation I would create a variable WORKSPACE_NPM_TIMEOUT similar to the WORKSPACE_NPM_REGISTRY implementation in which it is applied only if the variable has some value, which would be numerical only.

Describe alternatives you've considered
Add something like GLOBAL_TIMEOUT instead WORKSPACE_NPM_TIMEOUT

Additional context
The original command I was executing to run into this problem was

docker-compose up -d nginx

I got into this problem when I was installing the latest tag version but my boss told-me to use v8.0 of laradock, when I restart the containers I was already with the timeout therefor I don't know if this would be an issue on v8.0

System environment

$ env
SHELL=/bin/bash
SESSION_MANAGER=local/ricardophp-System-Product-Name:@/tmp/.ICE-unix/1930,unix/ricardophp-System-Product-Name:/tmp/.ICE-unix/1930
QT_ACCESSIBILITY=1
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2
LC_ADDRESS=pt_BR.UTF-8
GNOME_SHELL_SESSION_MODE=ubuntu
LC_NAME=pt_BR.UTF-8
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TERMINATOR_UUID=urn:uuid:39366fbb-a123-4e91-bf95-5e97d5f0580a
XMODIFIERS=@im=ibus
DESKTOP_SESSION=ubuntu
LC_MONETARY=pt_BR.UTF-8
SSH_AGENT_PID=1889
GTK_MODULES=gail:atk-bridge
PWD=/mnt/sda2/home/ricardophp/src/laradock
LOGNAME=ricardophp
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=x11
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
XAUTHORITY=/run/user/1000/gdm/Xauthority
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
WINDOWPATH=2
HOME=/home/ricardophp
USERNAME=ricardophp
IM_CONFIG_PHASE=1
LC_PAPER=pt_BR.UTF-8
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=ubuntu:GNOME
VTE_VERSION=6003
INVOCATION_ID=4036a2edc5a6427797481697131b3478
TERMINATOR_DBUS_NAME=net.tenshu.Terminator21a9d5db22c73a993ff0b42f64b396873
MANAGERPID=1690
GJS_DEBUG_OUTPUT=stderr
NVM_DIR=/home/ricardophp/.nvm
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
TERM=xterm-256color
LC_IDENTIFICATION=pt_BR.UTF-8
LESSOPEN=| /usr/bin/lesspipe %s
USER=ricardophp
DISPLAY=:0
SHLVL=1
NVM_CD_FLAGS=
LC_TELEPHONE=pt_BR.UTF-8
QT_IM_MODULE=ibus
LC_MEASUREMENT=pt_BR.UTF-8
LC_CTYPE=pt_BR.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
LC_TIME=pt_BR.UTF-8
JOURNAL_STREAM=9:41643
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
PATH=/home/ricardophp/.npm-global/bin:/home/ricardophp/.nvm/versions/node/v8.17.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
GDMSESSION=ubuntu
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
NVM_BIN=/home/ricardophp/.nvm/versions/node/v8.17.0/bin
GIO_LAUNCHED_DESKTOP_FILE_PID=3263
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/terminator.desktop
LC_NUMERIC=pt_BR.UTF-8
OLDPWD=/mnt/sda2/home/ricardophp/src
_=/usr/bin/env

$ cat /etc/issue
Ubuntu 20.04.1 LTS \n \l

$ docker --version
Docker version 19.03.8, build afacb8b7f0
@rstriquer
Copy link
Author

If anyone can tell me the team workflow I guess I can create a PR for this quite quickly.I'm new to the project. I have no idea how the community here behaves, I looked for something similar in the documentation and opened the issue for I didn't find anything, maybe some adjustment in the documentation is enough.

But if you decide to create the variable, I believe I can provide the procedure. I just don't know how to perform the procedure. I'd do a branch with the name of the variable and then open a PR for review. If so, I guess I could help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant