UI: child jobs for the wrong parent shown in "job launches" table
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Nomad version
```
Nomad v1.8.0
BuildDate 2024-05-28T17:38:17Z
Revision 28b82e4b2259fae5a62e2ed47395334bea5a24c4
```
### Operating system and Environment details
```
Linux ip-172-31-6-94 6.8.0-1010-aws #10-Ubuntu SMP Thu Jun 13 17:36:15 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
```
### Issue


If I launch one job then it displays good:

### Reproduction steps
1. Nomad plan/run backup job
2. Nomad plan/run reindex job
3. Open WebUI, Click reindex job
#### Expected Result
Because the reindex job is new there should be no logs about launches
#### Actual Result
Nomad WebUI displays info from different job
### Job file
```
job "postgres-backup" {
region = "XX"
datacenters = ["XX"]
type = "batch"
# Backup a database every 4 hours
periodic {
enabled = true
crons = [ "* * */7 * * * *" ]
time_zone = "America/Toronto"
prohibit_overlap = true
}
group "db-backup" {
task "postgres-backup-task" {
driver = "raw_exec"
config {
command = "/bin/bash"
args = ["local/script.sh"]
}
template {
destination = "local/script.sh"
data = <<-EOH
set -ex
.......
EOH
}
}
}
}
```
Reindex
```
job "postgres-reindex" {
region = "XX"
datacenters = ["XX"]
type = "batch"
periodic {
enabled = true
crons = [ "* * 10 * * *" ]
time_zone = "America/Toronto"
prohibit_overlap = true
}
group "db-backup" {
task "postgres-reindex-task" {
driver = "raw_exec"
config {
command = "/bin/bash"
args = ["local/script.sh"]
}
template {
destination = "local/script.sh"
data = <<-EOH
set -ex
....
EOH
}
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in the Nomad WebUI: run the postgres-backup job, then postgres-reindex, and open the reindex job's job launches table. Trace how the table selects child jobs and compare the displayed data with the expected empty state. Done means a newly launched job no longer shows launches belonging to a different job, with a regression test covering the sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100