Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't download empty blobs for stdout / stderr #1239

Conversation

peterebden
Copy link
Member

No description provided.

b, err := c.client.ReadBlob(context.Background(), digest.NewFromProtoUnvalidated(ar.StdoutDigest))
if err != nil {
return metadata, err
}
metadata.Stdout = b
}
if needStderr && len(metadata.Stderr) == 0 && ar.StderrDigest != nil {
if needStderr && len(metadata.Stderr) == 0 && ar.StderrDigest != nil && ar.StderrDigest.Hash != digest.Empty.Hash {
b, err := c.client.ReadBlob(context.Background(), digest.NewFromProtoUnvalidated(ar.StderrDigest))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this can be done in ReadBlob

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be; bazelbuild/remote-apis-sdks#184 would indeed do that.

@peterebden peterebden closed this Sep 22, 2020
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