apache / kyuubi

Apache Kyuubi is a distributed and multi-tenant gateway to provide serverless SQL on data warehouses and lakehouses.
https://kyuubi.apache.org/
Apache License 2.0
2.11k stars 915 forks source link

[REST] Check max file size of uploaded resource and extra resources in batch creation #6756

Closed bowenliang123 closed 1 month ago

bowenliang123 commented 1 month ago

:mag: Description

Issue References ๐Ÿ”—

This pull request fixes #

Describe Your Solution ๐Ÿ”ง

Check the uploaded resource files when creating batch via REST API

Types of changes :bookmark:

Test Plan ๐Ÿงช

Behavior Without This Pull Request :coffin:

Behavior With This Pull Request :tada:

Related Unit Tests


Checklist ๐Ÿ“

Be nice. Be informative.

wForget commented 1 month ago

Should we limit uploaded file size in writeToTempFile?

bowenliang123 commented 1 month ago

Should we limit uploaded file size in writeToTempFile?

Maybe no. The writeToTempFile method handles an unbounded stream with no predefined or known byte size. The file size is checked afterwards for varying purpose.

wForget commented 1 month ago

Should we limit uploaded file size in writeToTempFile?

Maybe no. The writeToTempFile method handles an unbounded stream with no predefined or known byte size. The file size is checked afterwards for varying purpose.

I see, thank you.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (e663cc3) to head (5c409c4). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...in/scala/org/apache/kyuubi/config/KyuubiConf.scala 0.00% 10 Missing :warning:
.../apache/kyuubi/server/api/v1/BatchesResource.scala 0.00% 10 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6756 +/- ## ====================================== Coverage 0.00% 0.00% ====================================== Files 684 684 Lines 42288 42308 +20 Branches 5768 5771 +3 ====================================== - Misses 42288 42308 +20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.