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

Failed test cleanup usability improvements #114

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

danielrbradley
Copy link
Member

Make cleaning up stacks easier

  • Print instructions on how to retain resources on failure.
  • When retaining resources explain why this is happening and write out a destroy script for the user to run once they've finished their investigations.

Related to #109

Make temp directory cleanup easier to control

  • Maintain existing defaults - keeping files locally on failure by default.
  • Add explicit control via PULUMITEST_RETAIN_FILES_ON_FAILURE with prompting to the user on failure.
  • Default to retaining if we've retained the resources.
  • Finally, check for the CI env var.

@danielrbradley danielrbradley requested review from t0yv0 and a team October 20, 2024 01:06
@danielrbradley danielrbradley self-assigned this Oct 20, 2024
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change itself is good.

I'd like to see a less messy way to handle env vars. We don't need to block on it, but I think the cleanup would be worth it.

pulumitest/cleanup.go Outdated Show resolved Hide resolved
pulumitest/cleanup.go Outdated Show resolved Hide resolved
- Print instructions on how to retain resources on failure.
- When retaining resources explain why this is happening and write out a destroy script for the user to run once they've finished their investigations.

Related to #109
- Maintain existing defaults - keeping locally.
- Add explicit control via PULUMITEST_RETAIN_FILES_ON_FAILURE with prompting to the user on failure.
- Default to retaining if we've retained the resources.
- Finally, check for the `CI` env var.
@danielrbradley danielrbradley merged commit e07c9c9 into main Oct 23, 2024
2 checks passed
@danielrbradley danielrbradley deleted the stack-cleanup-help branch October 23, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants