Skip to content

Conversation

@uillianluiz
Copy link
Contributor

Transient errors are retried by readStreamedRetried and it continues reading from how many bytes were already read. When an error happens in the stream call (for example, DeadlineExceeded), we were returning that 0 bytes were read.

Since DeadlineExceeded is transient, the retry happens and we start from byte 0 again, leading to a lot of duplication.

Note that the other errors return a fmt.Errorf, which is not a transient error and won't be retried.

The current behavior seems to be only working to retry at the start of the stream, when no bytes were there yet.

Fix readStreamedRetried in rbe bytestream

Transient errors are retried by `readStreamedRetried` and it continues reading from how many bytes were already read. When an error happens in the stream call (for example, `DeadlineExceeded`), we were returning that 0 bytes were read.

Since `DeadlineExceeded` is transient, the retry happens and we start from byte 0 again, leading to a lot of duplication.

Note that the other errors return a `fmt.Errorf`, which is not a transient error and won't be retried.

The current behavior seems to be only working to retry at the start of the stream, when no bytes were there yet.
@bentekkie bentekkie merged commit 0d3927a into bazelbuild:master May 7, 2025
6 checks passed
uillianluiz added a commit to uillianluiz/remote-apis-sdks that referenced this pull request May 15, 2025
* Fix readStreamedRetried retry in bytestream (bazelbuild#619)

Fix readStreamedRetried in rbe bytestream

Transient errors are retried by `readStreamedRetried` and it continues reading from how many bytes were already read. When an error happens in the stream call (for example, `DeadlineExceeded`), we were returning that 0 bytes were read.

Since `DeadlineExceeded` is transient, the retry happens and we start from byte 0 again, leading to a lot of duplication.

Note that the other errors return a `fmt.Errorf`, which is not a transient error and won't be retried.

The current behavior seems to be only working to retry at the start of the stream, when no bytes were there yet.

* Fix bug in handling of expiry buffer. (bazelbuild#620)

* update flatten action outputs to consider OutputSymlinks

OutputSymlinks is the non-deprecated way to provide symlinks, but not handled in the FlattenActionOutputs.

* Update test to account outputsymlink

---------

Co-authored-by: ramymedhat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants