Skip to content

feat: Add filterable endpoint to retrieve all tasks on site #399

@nvlitagaki

Description

@nvlitagaki

Is this a new feature, an enhancement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Medium

Please provide a clear description of problem this feature solves

At present, when a user initiates one or more tasks (power cycle, firmware update, rack bring-up, etc), the response includes IDs for each task initiated, and the retrieve a task endpoint allows the user to query the task status by ID. However, there is no way for the user to see the status of all the tasks running on a site, rack or tray, nor can they query tasks initiated by other users because they won't know the correct ID to query.

If a user could see what tasks were currently running and where, they could better understand the status of their hardware. This visibility would
a) avoid or at least reduce efforts to initiate conflicting/redundant tasks
b) reduce support calls due to transient task-related states

Feature Description

As an API user, I would like to be able to query the list of tasks on my site and filter them by a variety of parameters to answer questions like:

  • Was there any task going on in tray Y during a specific time window last night that might explain some anomalous behavior we saw during that period?
  • I'm planning a firmware upgrade on rack Y. Are there any scheduled tasks that might interfere?
  • When was the last firmware update on tray X and what was its status?
  • How have rack bring-up tasks on this site gone?
  • What, if any, tasks were run by user X who was accidentally given access inappropriately?

Describe your ideal solution

This could be handled by adding a new retrieve all tasks endpoint that lets the user fetch the full list of tasks on a site in paginated fashion. Ideally it would allow filtering by task status, task type (power, firmware, bring-up), and the associated component id, be it rack or tray.

Being able to additionally filter by the time frame and initiating user would also be nice.

Describe any alternatives you have considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow NCX Infra Controller's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

Metadata

Metadata

Assignees

Labels

featureFeature (deprecated - use issue type, but it's needed for reporting now)roadmapTracked roadmap project item

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions