-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Describe the bug.
When logged in as Guest user, the user cannot collapse the Tasks > Filters by default when using Local Deployment, preventing the users from performing further actions. Manually setting to a valid filter can bypass the issue (e.g., Users: All and click Refresh, or Custom: testuser).
2025-12-17.18-23-29.mp4
This doesn't happen when building OSMO following the Developer Guide. It seems that the DEV mode correctly sets the Guest username as testuser, while the Local Deployment somehow has the Guest username set to an empty string. I suspect the issue is related to the following snippet when using Local Deployment (I haven't tested on Minimal Deployment):
OSMO/ui/src/components/AuthProvider.tsx
Lines 106 to 112 in 996d30e
| get username() { | |
| if (!this.authEnabled) { | |
| return "testuser"; | |
| } | |
| return this.claims?.email ?? this.claims?.preferred_username ?? ""; | |
| } |
The empty username will trigger the error:
OSMO/ui/src/app/tasks/page.tsx
Lines 158 to 160 in 996d30e
| if (selectedUsers.length === 0 && userType !== UserFilterType.ALL) { | |
| errors.push("Please select at least one user"); | |
| } |
which in turn causes the filter to refuse being collapsed:
OSMO/ui/src/app/tasks/page.tsx
Lines 178 to 196 in 996d30e
| useEffect(() => { | |
| if ( | |
| validateFilters({ | |
| userType, | |
| isSelectAllPoolsChecked, | |
| selectedUsers: userFilter ?? "", | |
| selectedPools: poolFilter, | |
| dateRange, | |
| startedAfter: dateAfterFilter, | |
| startedBefore: dateBeforeFilter, | |
| workflowId: nameFilter ?? "", | |
| nodes: nodes ?? "", | |
| isSelectAllNodesChecked: isSelectAllNodesChecked ?? true, | |
| allStatuses: allStatuses ?? true, | |
| statuses: statusFilter ?? "", | |
| }).length > 0 | |
| ) { | |
| setShowFilters(true); | |
| } |
Note that the above validation fails silently. It would be better if the errors can be shown in the UI.
The username discrepancy can be seen in the URL after clicking Reset, below compares the URL of the DEV build vs. Local Deployment
- DEV build:
http://localhost:3000/tasks?allNodes=true&allStatuses=false&allUsers=false&allPools=true&users=testuser - Local Deployment:
http://quick-start.osmo/tasks?allNodes=true&allStatuses=false&allUsers=false&allPools=true&users=
I'm happy to test this further and open a PR. However, I'm currently blocked by Issue #163 and am having trouble building the osmo/ui image with my changes.
Minimum reproducible example
- Set up a Local Deployment
- Go to
http://quick-start.osmo/, and confirm the user isGuest - Click the
Taskstab - Observe the issue where the filter cannot collapse, thus preventing the user from performing any further actions (such as switching tabs)
Relevant log output
Has no console log or k8s pods log by default. However, if changed the filter to Users: Custom > testuser, Refresh, and then Reset, the following console logs will appear, which indicates that the username is an empty string:
useBaseQuery.ts:100
GET http://quick-start.osmo/trpc/tasks.getList?batch=1&input=%7B%220%22%3A%7B%2…undefined%22%5D%2C%22started_before%22%3A%5B%22undefined%22%5D%7D%7D%7D%7D 500 (Internal Server Error)
setTimeout
(anonymous) @ useBaseQuery.ts:100
app-index.tsx:25 << query #9 tasks.getList
Object
push.9262.window.console.error @ app-index.tsx:25
Promise.then
(anonymous) @ useBaseQuery.ts:100
{
"input": {
"limit": 1000,
"order": "DESC",
"all_users": false,
"users": [
""
],
"all_pools": true,
"pools": [],
"statuses": [
"SCHEDULING",
"PROCESSING",
"INITIALIZING",
"RUNNING"
],
"workflow_id": "",
"nodes": []
},
"result": {
"meta": {
"response": {},
"responseJSON": [
{
"error": {
"json": {
"message": "Invalid user(s): not found",
"code": -32603,
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "tasks.getList",
"zodError": null
}
}
}
}
]
},
"shape": {
"message": "Invalid user(s): not found",
"code": -32603,
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "tasks.getList",
"zodError": null
}
},
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "tasks.getList",
"zodError": null
},
"name": "TRPCClientError"
},
"elapsedMs": 118,
"context": {}
}
Environment
- Kubernetes version
kind version 0.30.0 - OSMO version
OSMO v6.0.0 - Scheduler version
v0.8.1 - Cloud provider or hardware configuration
- Anything else that is relevant
Issue persists in both Chrome and Firefox, also tested the behavior through browser on another machine
Code of Conduct
- I agree to follow NVIDIA OSMO's Code of Conduct
- I have searched the open bugs and have found no duplicates for this bug report