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

Issue #929 implement a utility class to save large downloads to a file #12292

Closed

Conversation

arsenalzp
Copy link
Contributor

@arsenalzp arsenalzp commented Sep 19, 2024

Hello,
This PR is trying to implement feature described in the issue #929.

Fixes: #929

@arsenalzp arsenalzp changed the title Issue# 929 save large file Issue #929 implement a utility class to save large downloads to a file Sep 19, 2024
@joakime joakime linked an issue Sep 19, 2024 that may be closed by this pull request
@joakime
Copy link
Contributor

joakime commented Sep 19, 2024

The CI build failed due to javadoc issues.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.7.0:javadoc-no-fork (default) on project jetty-client: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 1
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:40: error: reference not found
[ERROR]  * Implementation of {@link Listener} that produces an {@link Path}
[ERROR]                             ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:42: error: unknown tag: URL
[ERROR]  * like curl <URL> -o file.bin does.
[ERROR]              ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:50: error: unknown tag: Path
[ERROR]  *  CompletableFuture<Path> completable = PathResponseListener.write(request, Path.of("/tmp/file.bin"));
[ERROR]                      ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:52: error: unexpected end tag: </p>
[ERROR]  * </p>
[ERROR]    ^
[ERROR] 4 errors

You can see your CI builds here -> https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/activity?branch=PR-12292

@arsenalzp
Copy link
Contributor Author

The CI build failed due to javadoc issues.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.7.0:javadoc-no-fork (default) on project jetty-client: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 1
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:40: error: reference not found
[ERROR]  * Implementation of {@link Listener} that produces an {@link Path}
[ERROR]                             ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:42: error: unknown tag: URL
[ERROR]  * like curl <URL> -o file.bin does.
[ERROR]              ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:50: error: unknown tag: Path
[ERROR]  *  CompletableFuture<Path> completable = PathResponseListener.write(request, Path.of("/tmp/file.bin"));
[ERROR]                      ^
[ERROR] /home/jenkins/agent/workspace/jetty.project_PR-12292/jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathResponseListener.java:52: error: unexpected end tag: </p>
[ERROR]  * </p>
[ERROR]    ^
[ERROR] 4 errors

You can see your CI builds here -> https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/activity?branch=PR-12292

Hello,
Thank you for your advice, fixed.

@arsenalzp
Copy link
Contributor Author

All tests passed on my laptop with JDK17. Should I also run tests with JDK22?

Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

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

@arsenalzp good effort!
Please follow my review, and your implementation should become much simpler and with less code.
Thanks!

@sbordet
Copy link
Contributor

sbordet commented Sep 20, 2024

All tests passed on my laptop with JDK17. Should I also run tests with JDK22?

Our CI environment will do it, but sure if you want to try, give it a go.

@sbordet sbordet self-requested a review September 20, 2024 13:28
@sbordet
Copy link
Contributor

sbordet commented Sep 24, 2024

@arsenalzp, did you have time to review my comments? Thanks!

@arsenalzp
Copy link
Contributor Author

@arsenalzp, did you have time to review my comments? Thanks!

Hello,
Sure, I did, it is very appreciated. I'm working on it!

@arsenalzp
Copy link
Contributor Author

It is failed on JDK21, previous failure was on JDK22.
On my laptop tests passed on JDK17 and JDK22.

Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

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

Another good step, please review my comments.

Signed-off-by: Oleksandr Krutko <[email protected]>

make File channel field to ba the final

Signed-off-by: Oleksandr Krutko <[email protected]>
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

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

Good work @arsenalzp -- let's finish with the last touches.

@arsenalzp
Copy link
Contributor Author

Good work @arsenalzp -- let's finish with the last touches.

I would like to tackle with another issue, something like the current one.
Is it still possible?

@sbordet
Copy link
Contributor

sbordet commented Sep 26, 2024

I would like to tackle with another issue, something like the current one. Is it still possible?

It is always possible to tackle issues 😃
Release 12.0.14 is however about to be closed, so the other issue will be scheduled in the next release.

@arsenalzp
Copy link
Contributor Author

I would like to tackle with another issue, something like the current one. Is it still possible?

It is always possible to tackle issues 😃 Release 12.0.14 is however about to be closed, so the other issue will be scheduled in the next release.

So, I would like to take something for my level, and interesting like this particular Issue.

@sbordet
Copy link
Contributor

sbordet commented Sep 26, 2024

So, I would like to take something for my level, and interesting like this particular Issue.

Fine, but first let's finish this one 😄

You can pick any that you like that has the label Help-Wanted.

@sbordet sbordet self-requested a review September 27, 2024 13:56
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

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

Good job, thank you!

I'll squash and merge your work, and you'll retain authorship.

@sbordet
Copy link
Contributor

sbordet commented Sep 27, 2024

@arsenalzp please have a look at the final result.
I have simplified a few things with respect to your work, and if you have questions ask away.
Thanks for this contribution, it's merged.

@sbordet sbordet closed this Sep 27, 2024
@arsenalzp
Copy link
Contributor Author

Everything is fine, thank you for your support!

@arsenalzp arsenalzp deleted the Issue_929_save_large_file branch October 8, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Implement a utility class to save large downloads to a file
3 participants