Skip to content

fix: return an empty page for unmatched dashboard users - #8490

Merged
Aias00 merged 1 commit into
apache:masterfrom
cloudbase-ai:fix/admin-empty-users-20261115
Nov 16, 2026
Merged

Aias00 merged 1 commit into
apache:masterfrom
cloudbase-ai:fix/admin-empty-users-20261115

Conversation

@cloudbase-ai

Copy link
Copy Markdown
Contributor

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 e9345162a and 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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Dashboard user searches report an error when no users match

2 participants