You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had deployed the go-getting-started example and modified the okteto manifest to set some requests to me dev container and when I executed okteto up I'm getting a panic error:
okteto up
i Using ifbyol @ xxxxxxxxx as context
i 'go-getting-started' was already deployed. To redeploy run 'okteto deploy' or 'okteto up --deploy'
i Images were already built. To rebuild your images run 'okteto build' or 'okteto deploy --build'
panic: runtime error: index out of range [1] with length 0
goroutine 87 [running]:
github.com/okteto/okteto/pkg/k8s/deployments.getResourceLimitError({0xc0001d2a80, 0x75}, 0xc001d52600)
github.com/okteto/okteto/pkg/k8s/deployments/crud.go:186 +0x3f3
github.com/okteto/okteto/pkg/k8s/deployments.CheckConditionErrors(0x3c67f30?, 0xc001c74480?)
github.com/okteto/okteto/pkg/k8s/deployments/crud.go:158 +0x331
github.com/okteto/okteto/pkg/k8s/apps.(*DeploymentApp).CheckConditionErrors(0xc001c64198?, 0x3c43bb0?)
github.com/okteto/okteto/pkg/k8s/apps/deployments.go:111 +0x1d
github.com/okteto/okteto/pkg/k8s/apps.GetRunningPodInLoop({0x3c43bb0, 0xc0000b0690}, 0xc001d52600, {0x3c56448, 0xc001c64198}, {0x3c67f30, 0xc001c74480})
github.com/okteto/okteto/pkg/k8s/apps/crud.go:73 +0x107
github.com/okteto/okteto/cmd/up.(*upContext).createDevContainer(0xc0000de160, {0x3c43bb0, 0xc0000b0690}, {0x3c56448, 0xc000193e00}, 0x0)
github.com/okteto/okteto/cmd/up/activate.go:308 +0x76d
github.com/okteto/okteto/cmd/up.(*upContext).devMode(0xc0000de160?, {0x3c43bb0, 0xc0000b0690}, {0x3c56448, 0xc000193e00}, 0x6?)
github.com/okteto/okteto/cmd/up/activate.go:246 +0x32
github.com/okteto/okteto/cmd/up.(*upContext).activate(0xc0000de160)
github.com/okteto/okteto/cmd/up/activate.go:138 +0xaa5
github.com/okteto/okteto/cmd/up.(*upContext).activateLoop(0xc0000de160)
github.com/okteto/okteto/cmd/up/up.go:705 +0x296
created by github.com/okteto/okteto/cmd/up.(*upContext).start
github.com/okteto/okteto/cmd/up/up.go:637 +0x6e5
Checking the stack trace, it seems we are trying to access to an element of an empty array. It seems the error is because the memory I specified is too high. I wasn't able to reproduce it with other examples like movies.
To Reproduce
Steps to reproduce the behavior:
Deploy go-getting-started
Modify the okteto manifest to specify the following: resources.requests.cpu=200m and resources.requests.memory=10Gi
Execute okteto up
Expected behavior
I shouldn't get a panic. If the operation cannot be done for whatever reason I should get a proper error message
Desktop (please complete the following information):
Version: 2.18.0
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Hi @ifbyol, I couldn't reproduce the issue. I added the following requests to the manifest and I was able to run okteto up without a problem. Is there any cluster configuration that I need to setup in order to reproduce it?
resources:
requests:
cpu: 20000mmemory: 1000Gi
Checking the requests in the yaml I can see that we are setting them correctly
I tried to reproduced it, but I wasn't able. Anyways, given the code, it seems we are trying to get the second position of an array without checking the length, so ti can happen potentially in some scenarios. Can we some defensive programming to prevent it?
Describe the bug
I had deployed the
go-getting-started
example and modified the okteto manifest to set some requests to me dev container and when I executedokteto up
I'm getting a panic error:Checking the stack trace, it seems we are trying to access to an element of an empty array. It seems the error is because the memory I specified is too high. I wasn't able to reproduce it with other examples like movies.
To Reproduce
Steps to reproduce the behavior:
resources.requests.cpu
=200m
andresources.requests.memory
=10Gi
okteto up
Expected behavior
I shouldn't get a panic. If the operation cannot be done for whatever reason I should get a proper error message
Desktop (please complete the following information):
2.18.0
Additional context
N/A
The text was updated successfully, but these errors were encountered: