Idempotent Payloads vs. ETag Conditional Requests for Safe Retries in Portainer API
0 reputation · 22 Oct 2020, 20:02 UTC
The goal is to safely retry failed API calls through Portainer without causing duplicate writes when interacting with the Docker daemon via the /api/endpoints/{id}/docker proxy.
Portainer documents that create/update operations are idempotent when the request includes a stable identifier, and that conditional requests using If‑Match/ETag prevent duplicate writes for mutable resources. However, the Docker proxy endpoint does not return a stable ETag in version 2.19.x, making the conditional retry mechanism unreliable, and ad‑hoc commands lack natural idempotency.
- Should clients implement application‑level deduplication using unique request identifiers for proxy calls?
- Is it acceptable to rely solely on idempotent endpoints for resource creation and use external locking or serialization for Docker proxy operations?
- Can a wrapper layer generate and validate client‑side ETags for the proxy endpoint to restore conditional retry safety?