devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.17k stars 351 forks source link

Issue with --no-warn when using commands #2837

Closed fmc100 closed 2 months ago

fmc100 commented 2 months ago

What happened?
I noticed --no-warn or anything like that doesn't work for devspace run even if the run is just doing a command that is just echo "hello".

What did you expect to happen instead?
I expected there to be a way to ignore warn Are you using the correct namespace? or warn Deploying into the 'default' namespace is usually not a good idea as this namespace cannot be deleted warnings. These warnings didn't pop up until version 6.3.11 of devspace.

How can we reproduce the bug? (as minimally and precisely as possible)
Make sure you have switched namespaces or just point to default then run devspace run test with the below devspace.yaml. You should get a warning about the context, and have no way to ignore that warning. If you lower your version down to 6.3.10 then it should work again.

My devspace.yaml:

version: v2beta1

commands:
  test: |-
    echo "hello"

Local Environment:

Anything else we need to know?
I tried this out in other versions and it worked in 6.3.10 or lower so I think the change is in 6.3.11, possibly this change.