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

Improved resource deletion actions/guidance #82

Open
blanquicet opened this issue Oct 5, 2023 · 1 comment
Open

Improved resource deletion actions/guidance #82

blanquicet opened this issue Oct 5, 2023 · 1 comment

Comments

@blanquicet
Copy link
Member

As a newcomer, after running ie execute [markdown file] --do-not-delete=false (the --do-not-delete flag could have been skipped as it is false by default), I was expecting that the Azure resources created by the scenario would have been deleted. However, it didn't happen because the markdown I used scenarios/ocd/CreateLinuxVMSecureWebServer/README.md doesn't contain the az group delete --name $MY_RESOURCE_GROUP_NAME command.

At this point, I would say that the --do-not-delete flag applies only if the the scenario contains the az group delete command, as confirmed by the comments:

// If a scenario has an `az group delete` command and the `--do-not-delete`
// flag is set, we remove it from the steps.

Therefore, I suggest to change the flag name from do-not-delete to skip-delete-cmds or skip-deletion or something similar. IMHO, that would make the flag usage clearer.

@blanquicet blanquicet changed the title The --do-not-delete flag name is misleading cmd/ie/commands/execute: The --do-not-delete flag name is misleading Oct 5, 2023
@mbifeld mbifeld added bug Something isn't working innovation engine and removed bug Something isn't working labels Dec 8, 2023
@rgardler-msft
Copy link
Collaborator

rgardler-msft commented Jan 10, 2025

Changing the title of this to "Improved resource deletion actions/guidance" and upping the priority as this is a UX issue that is indeed confusing. We need to consider the behaviour of IE when there is a delete section in the document.

Initial thoughts on what we should do:

  • in execute only output deletion instructions
  • in test always delete resources upon success
  • in learn mode ask the user if they want to delete
  • in all cases if a deployment fails provide instructions (if not interactive) or ask whether they should be deleted (if interactive) - fixes (see Auto delete resources in error case in 'azure' environment #181 )

@rgardler-msft rgardler-msft changed the title cmd/ie/commands/execute: The --do-not-delete flag name is misleading Improved resource deletion actions/guidance Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 To Do
Development

No branches or pull requests

3 participants