Ideas for skipping cleanup on error?
See original GitHub issueJust ran an apply/destroy cycle through tftest, where on destroy I ran into a timing error when waiting for a resource to change to the expected state:
Error: Error waiting for VPC Peering Connection (pcx-....) to be deleted: timeout while waiting for state to become 'rejected, deleted' (last state: 'active', timeout: 1m0s)
Ok, not great, but no big deal, just go into the test directory and re-run destroy… Except, the tfstate file is gone, so can’t do that!
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Best practices for non-local exit with cleanup in C?
What is considered best practice for aborting on errors in C? In our code base we currently have a pattern using #define CHECKERROR(code)...
Read more >8 Effective Data Cleaning Techniques for Better Data
1. Remove Duplicates · 2. Remove Irrelevant Data · 3. Standardize Capitalization · 4. Convert Data Types · 5. Clear Formatting · 6....
Read more >Better error handling in Golang: Theory and practical tips
Don't panic() ! It's a good life lesson in general, but especially important when writing Go code. Long-running applications should handle errors gracefully ......
Read more >9 Best Practices to Handle Java Exceptions - Stackify
1. Clean Up Resources in a Finally Block or Use a Try-With-Resource Statement · 2. Prefer Specific Exceptions · 3. Document the Exceptions...
Read more >Top 15 C++ Exception handling mistakes and how to avoid ...
MEASURE for yourself and then make a call. Think about what you're losing out by not using exceptions. If you hit a performance...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes you get a test pass which in our use case is what we want.
If that is not what you want add a pytest.fail to the except block
@ludoo Sorry I probably should have provided more explanation, let me provide a few examples of how I think the approach I suggested helps.
I agree it is probably a good idea to set cleanup_on_exit to False.