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

Fail request when error occurs during download #3214

Merged
merged 5 commits into from
Jan 26, 2024

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Jan 24, 2024

fixes: #3006

Checks whether the download was complete in the frontend.
In the backend, setting the headers doesn't work if it fails during io.Copy cause it already starterd writing to the body. So we just log it and handle it in the client layer.

On error:
After:
Screenshot 2024-01-24 at 5 06 38 PM

Test Steps:

  • Deploy a distributed minio e.g. using kind 4 nodes
  • expose the service
  • Upload a big object e.g. 100Mb
  • Go to the Browser UI
  • Cordon one of the nodes
  • Download the object (enabling throttling in your browser to emulate slow speed)
  • Delete one of the minio pods (it won't start since we cordoned a node)
  • In the UI the object download should eventually fail (before it was downloading an inclomplete object)

/// Other tests

  • Test downloading multiple files (selecting multiple)
  • Test downloading multiple files (selecting one, then download, then only other one and click download) so that the download box appears.

@cesnietor cesnietor requested a review from prakashsvmx January 25, 2024 01:09
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

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

Tested, LGTM
Screenshot 2024-01-26 at 3 05 44 p m

@bexsoft bexsoft merged commit d4c5e1b into minio:master Jan 26, 2024
28 of 29 checks passed
@@ -143,7 +146,7 @@ export const download = (
return;
}
}
errorCallback(`Unexpected response status code (${req.status}).`);
errorCallback(`Unexpected response, download incomplete.`);
Copy link
Member

Choose a reason for hiding this comment

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

Removing the status code does not help debugging, can we try to add more information here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

status by itself was also not very helpful. You'll need to see the logs for now. We were not exposing the errors before either.
Exposing detailed errors is in our backlog.

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.

Downloads fail without error when a node in the cluster goes down
4 participants