-
Notifications
You must be signed in to change notification settings - Fork 316
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
In some cases okteto deploy
is not returning the same output than the command executed
#2663
Comments
considering that the error if we execute the error returned by the UI is and the error returned by execute @ifbyol do we want our error message (in UI and CLI) to be directly the one returned by the helm command (last image) or do we want the UI to contain the error message currently displayed by the CLI ( |
The panic is thrown by
We want the helm error as is the one which contain the information about the real error. It is hard to debug the real issue if we only have this |
After investigating the causes of this issue we came to the conclusion that we do not get the same output since our proxy previously detects the expected error in this line which means that the request is not forwarded to the cluster (with the added label) and as a consequence we never get the expected error. If we want to get the same error we should forward the request to the cluster, even if we are not able to add the label. If we act in this way, we must be aware that if there is no error in the cluster and we have not modified the resource in the proxy, we will have resources in the cluster without the expected labels. @pchico83 @jmacelroy What do you think is the best solution in this case? |
I would go with forwarding the request to the server. We try to convert the body to the spec of the resource. If it fails, it would probably fail in the server. And if it doesn't fail, we don't block the user. If they have to delete some resources manually, I think it is better than preventing them to deploy the application. We might have issues in the future if some new version with different spec fields is released as we don't check the API version before trying to convert it to a specific spec, but I think that is another issue to be handled in another ticket. I'll create an issue for it |
+1 for @ifbyol approach |
Describe the bug
A customer has reported that the
okteto deploy
command was returning a cryptic error deploying a helm applicationIf the same command is executed directly from the terminal, the output is different, you can see the real error there:
This makes really hard to debug the issue just checking the logs returned by Okteto.
Maybe the proxy is not handling right the error
To Reproduce
Steps to reproduce the behavior:
I created a branch in a repository with a way to reproduce the issue. Repository
https://github.com/ifbyol/movies
and branchifbyol/invalid-chart
.Error: an error on the server ("") has prevented the request from succeeding (post deployments.apps)
helm upgrade --install movies chart --set tag=latest
(be aware of the kubeconfig used), you will see a completely different errorExpected behavior
The error in the Okteto UI should be the same than in the terminal
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: