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

okteto destroy command removes manifest information from config map even if the destroy command fails #3284

Open
ifbyol opened this issue Dec 7, 2022 · 2 comments
Labels
bug Something isn't working keep

Comments

@ifbyol
Copy link
Member

ifbyol commented Dec 7, 2022

Describe the bug

okteto destroy command removes manifest information from config map even if the destroy command fails. This provokes that the destroy all action in the backend doesn't work properly when a retry is done as the manifest is needed to know the commands to be executed on destroy

To Reproduce
Steps to reproduce the behavior:

  1. Define an okteto manifest with a destroy section with a command you know it's going to fail (for example, https://github.com/ifbyol/test-okteto/blob/manifest-with-destroy-fail/okteto.yaml)
  2. Deploy it via UI or using okteto deploy
  3. Go to the UI and go to the YAML tab, you should see the manifest
  4. Destroy the dev environment
  5. Refresh the UI and you can see that the yaml is not empty (you can also check the configmap to verify that the manifest is not there)

Expected behavior
The manifest shouldn't be deleted from the config map until the configmap is completely desleted as part of the destroy operation. If the destroy fails, the configmap should keep the manifest information

Desktop (please complete the following information):

  • 2.10.x

Additional context

You can see the manifest in the UI when the dev environment is deployed. You can see that there are a couple of commands in the destroy section and one of them executes a non-existent command

Captura de Pantalla 2022-12-07 a las 16 47 38

In the following screenshot you can see how the manifest is gone after executing a destroy

Captura de Pantalla 2022-12-07 a las 16 48 05

If you retry the destroy operation, it won't execute the destroy commands again

@ifbyol ifbyol added bug Something isn't working echoes/intent: fix labels Dec 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

This issue is stale because it has been open for 60 days with no activity. Comment on this issue or it will be closed in 7 days

@github-actions github-actions bot added the stale label Feb 6, 2023
@pchico83 pchico83 removed the stale label Feb 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

This issue is stale because it has been open for 60 days with no activity. Comment on this issue or it will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working keep
Projects
None yet
Development

No branches or pull requests

2 participants