Validate active job pagination parameters - #869
Open
codingkiddo wants to merge 1 commit into
Open
Conversation
Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
codingkiddo
requested review from
Andyz26,
calvin681,
dtrager02,
fdc-ntflx,
hellolittlej and
james-lubin
as code owners
August 5, 2026 03:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The
activeJobOverviewendpoint accepts optionalstartingIndexandpageSizequery parameters.Previously, these values were converted directly using
Integer.parseInt. Invalid values such as negative integers, non-numeric strings, empty values, or values exceeding the integer range could either be passed to the resource-cluster layer or result in an internal server error.This change validates both pagination parameters before invoking the underlying service.
Invalid values now return
400 Bad Requestwith a clear error message:startingIndex must be a non-negative integerpageSize must be a non-negative integerThe change also preserves
pageSize=0as a valid value.Changes
startingIndexandpageSize.startingIndex.pageSize=0remains valid.Checklist
./gradlew buildcompiles code correctly./gradlew testpasses all testsREADME and Javadoc changes are not applicable because this change only validates existing API parameters and does not introduce a new public API.