chore: remove unused PaginationParams, ObservabilityQueryParams, and PerformanceHistoryParams schemas#3708
Merged
crivetimihai merged 1 commit intoIBM:mainfrom Mar 22, 2026
Conversation
Member
|
Thanks @omorros. Clean dead code removal. LGTM. |
…PerformanceHistoryParams schemas (IBM#3706) Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
ee00b3e to
1fa1300
Compare
crivetimihai
approved these changes
Mar 22, 2026
Member
crivetimihai
left a comment
There was a problem hiding this comment.
Rebased onto main (clean, no conflicts).
Verified all three removed classes (PaginationParams, ObservabilityQueryParams, PerformanceHistoryParams) are genuinely dead code:
PaginationParams: Not imported or used anywhere. Live pagination usesparse_pagination_params()inmcpgateway/utils/pagination.py, which correctly clamps againstsettings.pagination_max_page_size. The removed class had a hardcodedle=500that would conflict with that configurable setting.ObservabilityQueryParams: Not imported or used. The observability router declares query parameters inline withQuery(...)inmcpgateway/routers/observability.py.PerformanceHistoryParams: Not imported or used.performance_service.get_history()takes individual parameters directly.
Repo-wide search (all .py, .html, .js, .yaml, .md files) confirmed zero live references — only the auto-generated classes.svg diagram, which will self-correct on next regeneration.
Test file cleanup is correct: removed PerformanceHistoryParams tests, removed unused pytest import, re-sorted imports (isort-compliant). All 22 remaining tests pass.
No security, performance, or consistency concerns. LGTM.
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.
🔗 Related Issue
Closes #3706
📝 Summary
Remove three unused Pydantic schema classes (
PaginationParams,ObservabilityQueryParams,PerformanceHistoryParams) frommcpgateway/schemas.py. These are dead code that no endpoint imports or uses. Notably,PaginationParamshardcodesle=500which would silently conflict with the configurablePAGINATION_MAX_PAGE_SIZEsetting if anyone used it, potentially reintroducing the 422 bug fixed in #3469.🏷️ Type of Change
🧪 Verification
make lintmake testmake coverage✅ Checklist
make black isort pre-commit)📓 Notes (optional)
PerformanceHistoryParamsunit tests fromtest_performance_schemas.pyand cleaned upthe now-unused
pytestimportgetPaginationParamsJavaScript function inadmin.html/admin.jsis unrelated (client-side paginationstate) and was not touched
classes.svgdiagram indocs/still references these classes; it will update on nextregeneration