aminghadersohi opened a new pull request, #40304:
URL: https://github.com/apache/superset/pull/40304

   ### SUMMARY
   
   Adds 4 new MCP tools across two new domains as part of story #99978:
   
   **Action Log domain** (`superset/mcp_service/action_log/`):
   - `list_action_logs`: Lists audit log entries with filtering, pagination, 
and a default 7-day dttm window to prevent oversized result sets on large 
instances. Admin-only.
   - `get_action_log_info`: Retrieves a single log entry by integer ID. 
Admin-only.
   
   **Task domain** (`superset/mcp_service/task/`):
   - `list_tasks`: Lists async tasks. Non-admin users are automatically scoped 
to tasks they are subscribed to via `TaskDAO.base_filter = TaskFilter`. Admins 
see all tasks.
   - `get_task_info`: Retrieves a single task by integer ID or UUID string.
   
   Both domains follow the established `ModelListCore` / `ModelGetInfoCore` 
patterns from the database domain.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — backend-only MCP tools.
   
   ### TESTING INSTRUCTIONS
   
   Run the new unit tests:
   ```bash
   pytest tests/unit_tests/mcp_service/action_log/
   pytest tests/unit_tests/mcp_service/task/
   ```
   
   Key behaviors verified by tests:
   - `list_action_logs` injects a `dttm >= now - 7 days` filter when no `dttm` 
filter is provided
   - `list_action_logs` skips the default filter when the caller provides a 
`dttm` filter
   - `list_action_logs` defaults to `order_column=dttm, order_direction=desc`
   - `list_tasks` delegates to `TaskDAO.list()` so `TaskFilter` scoping applies 
automatically
   - `get_task_info` resolves by both integer ID and UUID string
   - Not-found cases return structured `error_type: not_found` responses
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to