Revanth14 opened a new pull request, #1469: URL: https://github.com/apache/iceberg-go/pull/1469
## Summary Implements `Catalog.WaitForPlan` as part of [#1178](https://github.com/apache/iceberg-go/issues/1178), building on the merged scan-planning client methods (#1324). The poller waits for an asynchronously submitted REST scan plan to complete and returns the completed planning result (task envelope and storage credentials). ## Changes - Polls `FetchPlanningResult` using decorrelated-jitter backoff. - Handles completed, submitted, failed, cancelled, and expired plans. - Retries transient GET responses: `408`, `429`, `500`, `502`, `503`, and `504`. - Supports integer and HTTP-date `Retry-After` headers. - Uses the caller's context deadline as the primary timeout. - Adds `MaxRetries` and `ErrPlanPollExhausted`. - Cancels abandoned plans on context cancellation or retry exhaustion. - Bounds cleanup using `CancelGracePeriod`. - Forwards access-delegation headers while polling. - Handles failed responses with missing or malformed error details. - Threads HTTP status and `Retry-After` through the shared REST error type (`errorResponse`/`handleNon200`) so the poller can apply retry policy without re-plumbing each method. This is the only change outside the scan-planning surface. - Adds overflow-safe backoff calculations and empty plan-ID validation. When the context has a deadline, the default retry cap is disabled so polling continues until that deadline. This PR implements the wait/poll phase only. Scan-task **payload decoding** (`RESTFileScanTask`/`RESTDeleteFile`), `plan-tasks` fan-out, and wiring `PlanFiles` end-to-end remain follow-up work. ## Testing All pass, including under the race detector: ```text go test ./catalog/rest go test -race ./catalog/rest go vet ./catalog/rest -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
