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

DevSpace install loop with 4.12.2 #1089

Open
dsebastien opened this issue May 7, 2020 · 5 comments
Open

DevSpace install loop with 4.12.2 #1089

dsebastien opened this issue May 7, 2020 · 5 comments

Comments

@dsebastien
Copy link

@dsebastien dsebastien commented May 7, 2020

What happened?

After updating my project's dependency from 4.10.0 to 4.12.2, starting devspace sync causes an "install loop". I've tried removing the globally installed DevSpace package, removing/reinstalling my project dependencies, etc but I can't work around the issue.

What did you expect to happen instead?

DevSpace sync starting as usual

How can we reproduce the bug? (as minimally and precisely as possible)

Install 4.12.2 as a project dependency (not global). Configure and start devspace sync

Local Environment:

  • DevSpace Version: 4.12.2
  • Operating System: Linux (Ubuntu)

Kubernetes Cluster:

  • Cloud Provider: DigitalOcean

Anything else we need to know?

Here's how I start devspace: > npx devspace dev sync --namespace didowi-dev

And here's the console output:

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

Finishing installation of DevSpace CLI
Running: node /home/sebastien/.nvm/versions/node/v12.4.0/lib/node_modules/devspace/index.js finish-install
Download DevSpace CLI release: https://github.com/devspace-cloud/devspace/releases/download/v4.12.2/devspace-linux-amd64

/kind bug

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented May 7, 2020

npx and well as local package installs are generally not recommended and supported. The problem is that the devspace npm package needs to run finish-install to download the actual platform-dependent binary from GitHub (e.g. win 64 bit, linux 32 bit etc). However, to still at least allow local installs, I just opened a PR for this (#1090).

But still, running npx would trigger the binary download repeatedly which is very slow. You should not use npx for devspace unless you only really run it once like in a CI pipeline or so. But even then, just use our official Docker image for the pipeline.

@dsebastien
Copy link
Author

@dsebastien dsebastien commented May 7, 2020

Good to know, thanks Lukas.

I usually prefer local installs to ensure that all team members have the same baseline and only need to install the project dependencies. I can understand why you prefer having the huge binaries global though ;-)

I think I added npx at some point to ensure that the project-local version was used. If I'm not mistaken, the behavior of npx is that, if executed within a project's folder and if the target is in node_modules, then that version is used; otherwise it is downloaded/cached globally then executed.

In my case, npx is only used within some npm scripts.

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented May 7, 2020

Ah okay, I didn't know npx would use local packages if they are available. If that's the case, then using npx is actually not bad in combination with what I just pushed. What I changed is that the binary would be installed into the local folder, so npx would use the locally downloaded binary and not download it again. That would actually sound like it gets the advantages you want (local dependency, versioning in package.json) + no unnecessary downloads.

@dsebastien
Copy link
Author

@dsebastien dsebastien commented May 23, 2020

Should 4.12.5 fix this issue?

@LukasGentele
Copy link
Member

@LukasGentele LukasGentele commented May 23, 2020

With 4.12.5, it should be possible to run npx devspace commands. There was a small issue in the release which affects windows users but it will also be fixed with the next patch release. It's already in master. Are you able to run npx with devspace now?

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.