Repository navigation
fix: return an empty page for unmatched dashboard users - #8490
Merged
Aias00 merged 1 commit intoNov 16, 2026
Merged
Conversation
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.
Problem and change
Fixes #8486.
GET /dashboardUser returns HTTP 200 but application code 500 and data=null when a successful query has no matching users. DashboardUserController.queryDashboardUsers treats an empty dataList as DASHBOARD_QUERY_ERROR, discarding pagination metadata. This occurs after filtering to an absent name or deleting the final matching user.
Return the existing success envelope and pager for a successful user query even when no rows match. Individual missing-user detail handling and exception behavior are unchanged.
This branch is based directly on master
e9345162aand has no dependency on the other Admin follow-up PRs or dashboard migration drafts.IssueSpec
IssueSpec-Mode: lightweight
IssueSpec-Reason: Correct empty-result handling for the existing list endpoint, retaining its success envelope and pagination data; no new API or permission change.
IssueSpec-Validation: The named regression fails before the fix. The independent branch passes 24 focused tests plus reactor Checkstyle; the four-fix verification checkout passes 64 related tests and RAT; the added-code quality gate reports zero findings. Full repository clean install and browser testing of a rebuilt Admin are not run.
Production-fix lightweight classification remains subject to maintainer review under the repository policy.
Validation
./mvnw -pl shenyu-admin -am test -Dtest=DashboardUserControllerTest,DashboardUserServiceTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.javadoc.skip=true -Djacoco.skip=true— PASS (24 tests, no failures/errors/skips).python3 .github/scripts/check-new-code-quality.py --base origin/master --checkstyle-jar ../frontend-completion/checkstyle-9.3-all.jar— zero findings on this branch. The jar matches the workflow-pinned SHA-256../mvnw -pl shenyu-admin -am apache-rat:check— PASS on the combined verification checkout containing the same four independent changes.git diff --check origin/master...HEAD— PASS.DashboardUserControllerTest.queryDashboardUsersReturnsEmptyPage fails on unmodified master. The regression checks code 200, an empty dataList and totalCount/currentPage/pageSize via MockMvc.
You have read the contribution guidelines.
You submit test cases (unit or integration tests) that back your changes.
New production code follows the code quality rules Q1-Q9 in AGENTS.md.
Your local test passed
./mvnw clean install -Dmaven.javadoc.skip=true.