Add support for the UI block in task groups, tasks, and allocations
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Proposal
Add support for the `ui` block to be defined in `job.group` and `job.group.task`. Additionally, add support for alloc-specific ui links. Both could be achievable via some sort of url templating schema:
```hcl
# replacements
# - ${job_name}
# - ${group_name}
# - ${task_name}
# - ${allocation_id}
job "vector" {
group "vector" {
task "vector" {
ui {
link {
allocation_link = true
label = "logs"
url = "https://logs-ui.example.com/search?job=${job_name}&group=${group_name}&task=${task_name}&alloc=${allocation_id}"
}
}
}
}
}
```
### Use-cases
For more complex jobs, it may be useful to link out to external services - logs and metrics being the key ones - at a group or task level. This would allow for aggregated data that is specific to those levels - which is important in jobs that have multiple groups, or cases where there are multiple tasks within a group (such as for sidecars).
Additionally, having links out for _just_ allocations would allow folks to filter to the exact allocation that is being looked at. This is super useful when trying to figure out why one or more allocations are misbehaving.
### Attempted Solutions
At the moment, I need to copy the allocation ID and then paste it into a form elsewhere. This works for me but developers may be less clear as to where to browse on external services to filter data. Worse still, it makes it more difficult to migrate across external services (as in, if I move from Grafana => DataDog or back for logs/metrics) as now I need to communicate that change to developers and teach them the new way to do things. Having those links be embeddable in the Nomad UI will make it easier for folks to _use_ those links.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by tracing how existing ui blocks are represented and rendered for jobs, then follow job group, task, and allocation data into the Nomad UI. Done means group- and task-level links, plus allocation-specific links, accept the proposed template values and appear with the expected filtering context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100