hutiefang76 opened a new pull request, #4415:
URL: https://github.com/apache/amoro/pull/4415

   ## Why are the changes needed?
   Invalid table pagination parameters can reach backend work or overflow an 
int offset. All ten paginated table endpoints should return HTTP 400 for 
nonpositive values or an offset above Integer.MAX_VALUE, while preserving valid 
requests and the page=1/pageSize=20 defaults.
   
   Fixes #4412.
   
   ## Brief change log
   - Apply the same positive-value and long-arithmetic offset checks before 
table pagination.
   - Return Javalin validation errors for invalid process pagination rather 
than generic server errors.
   
   ## How was this patch tested?
   - [x] Add test cases: 108 cases cover all ten endpoints, 
malformed/nonpositive values, overflow, defaults, boundaries and actual task 
rows; four requests run through embedded Javalin and real exception handlers. 
Base: 64 failures; fixed: 108 passes.
   - [x] Run tests locally: new tests plus TestOptimizerGroupPagination pass, 
127 total. The 15-module Maven reactor compiles and Spotless/Checkstyle 
validation passes.
   - [ ] Add screenshots for manual tests if appropriate: REST validation 
change.
   
   ## Documentation
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ## Post-Deploy Monitoring & Validation
   During the first AMS validation after deployment, a maintainer should check 
an authenticated table request with ordinary pagination and then nonpositive 
and overflowing parameters. Valid requests should keep their previous results; 
invalid pagination should return 400 before descriptor work. Revert if valid 
pagination starts failing. No additional metric or log query is assumed; the 
response status is the validation signal.
   
   ---
   
   [![Compound 
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to