apache / apache/beam

[Feature Request]: Python GCSIO file uploader should retry

Open
#25,461 0 comments 0 reactions 0 assignees View on GitHub
awaiting triage io new feature python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What would you like to happen?

A user encounted repeated 503 errors when using a Customer DoFn with the GCSIO.
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/gcp/gcsio.py#L772

The uploader thread doesn't retry on retriable errors like 503

See https://cloud.google.com/storage/docs/json_api/v1/status-codes for error codes and their appropriate retry strategies (in particular [truncated exponential backoff](https://cloud.google.com/storage/docs/retry-strategy#exponential-backoff)).

### Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

### Issue Components

- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [X] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner

Contributor guide

Open the contributing guide

Research direction

Start in sdks/python/apache_beam/io/gcp/gcsio.py around line 772, where the uploader thread handles GCS errors. Read the linked Cloud Storage status-code and retry-strategy documentation first, then verify the behavior against retriable 503 responses and truncated exponential backoff.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.