In a Python automation workflow using Google Cloud APIs, which strategy most effectively prevents partial failures from leaving orphaned resources when a sequence of calls fails mid-run?

Answer

Implement idempotency keys and compensating actions using a transaction-like state machine persisted to durable storage

Explanation

Idempotency plus a persisted state machine lets you resume safely and run compensating actions for already-created resources, avoiding orphaned infrastructure.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list