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

Report digest of failed uploads #12507

Closed
wants to merge 3 commits into from

Conversation

Yannic
Copy link
Contributor

@Yannic Yannic commented Nov 18, 2020

This will make the error message more useful because otherwise, there
was no way of telling which upload failed or timed out (other than
running with -j 1)

@google-cla google-cla bot added the cla: yes label Nov 18, 2020
This will make the error message more useful because otherwise, there
was no way of telling which upload failed or timed out (other than
running with `-j 1`)
@Yannic
Copy link
Contributor Author

Yannic commented Nov 18, 2020

@coeuvre PTAL

/cc @ulfjack

@@ -83,10 +84,10 @@

/** Contains the hash codes of already uploaded blobs. **/
@GuardedBy("lock")
private final Set<HashCode> uploadedBlobs = new HashSet<>();
private final Set<Digest> uploadedBlobs = new HashSet<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

This may have used HashCode because it's more compact. I think you are changing this to get the size as well. The downside is that this could increase memory consumption by 2x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched uploadedBlobs´ back to HashCode`.

(sre) -> Futures.immediateFailedFuture(
new IOException(
String.format(
"Error while uploading artifact with digest '%s/%s'",
Copy link
Contributor

Choose a reason for hiding this comment

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

It's an improvement, but it would be even better if it gave a filename.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely! However, we won't get a filename here because the blob may not be a named file (e.g., std{out,err}). We would need to do that further downstream.

Let's start with the hash and I'll send a followup if I can figure out how to create an error message that contains the name.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@coeuvre coeuvre left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement! Please take a look at comments and I will import afterwards.

BTW, I am working on refactoring remote module with RxJava to improve readability and maintainability. RxByteStreamUploader is the first step and is almost done.

@coeuvre
Copy link
Member

coeuvre commented Nov 20, 2020

Thanks! Importing.

@bazel-io bazel-io closed this in 913a985 Nov 24, 2020
philwo pushed a commit that referenced this pull request Mar 15, 2021
This will make the error message more useful because otherwise, there
was no way of telling which upload failed or timed out (other than
running with `-j 1`)

Closes #12507.

PiperOrigin-RevId: 343977441
philwo pushed a commit that referenced this pull request Mar 15, 2021
This will make the error message more useful because otherwise, there
was no way of telling which upload failed or timed out (other than
running with `-j 1`)

Closes #12507.

PiperOrigin-RevId: 343977441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants