Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grandchild jobs in the Nomad UI #24338

Open
gulducat opened this issue Oct 30, 2024 · 0 comments
Open

Grandchild jobs in the Nomad UI #24338

gulducat opened this issue Oct 30, 2024 · 0 comments
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui type/enhancement

Comments

@gulducat
Copy link
Member

As pointed out in #24311, currently children of child jobs (I'll say grandchildren of grandparent jobs) are not easy to browse to in the Nomad web UI.

We brushed up against this when revamping the Jobs page (lil breadcrumb in rpc code), but I don't think we wrote it down anywhere to eventually swing back around to it.

CLI

grandparent.nomad.hcl:

# `nomad job run` produces a parameterized job
job "grandparent" {
  type = "batch"

  # `nomad job dispatch grandparent` produces a child job
  parameterized {}

  # `nomad job periodic force grandparent/`
  # of the child produces a periodic child,
  # i.e. a "grandchild" job of the original "grandparent"
  periodic {
    crons = ["30 2 * * * *"] # 2:30am daily, e.g.
  }

  group "example" {
    task "example" {
      driver = "docker"
      config {
        image   = "busybox:1"
        command = "sh"
        args    = ["-c", "echo hello; sleep 1"]
      }
    }
  }
}
$ nomad run grandparent.nomad.hcl
Job registration successful
$ nomad job dispatch grandparent
Dispatched Job ID = grandparent/dispatch-1730309121-2f3cdded
$ nomad job periodic force grandparent/
==> 2024-10-30T13:25:32-04:00: Monitoring evaluation "7e7eb01d"
    2024-10-30T13:25:32-04:00: Evaluation triggered by job "grandparent/dispatch-1730309121-2f3cdded/periodic-1730309132"
    2024-10-30T13:25:33-04:00: Allocation "c7540d85" created: node "4d4717d0", group "example"
    2024-10-30T13:25:33-04:00: Evaluation status changed: "pending" -> "complete"
==> 2024-10-30T13:25:33-04:00: Evaluation "7e7eb01d" finished with status "complete"
$ nomad status
ID                                                            Type                          Priority  Status   Submit Date
grandparent                                                   batch/periodic/parameterized  50        running  2024-10-30T13:25:17-04:00
grandparent/dispatch-1730309121-2f3cdded                      batch/periodic                50        running  2024-10-30T13:25:21-04:00
grandparent/dispatch-1730309121-2f3cdded/periodic-1730309132  batch                         50        dead     2024-10-30T13:25:32-04:00

Web UI

The grandchild is not browse-to-able through Jobs

Screenshot from 2024-10-30 13-29-34
Screenshot from 2024-10-30 13-29-50
Screenshot from 2024-10-30 13-30-10

Only through Evaluations (or generating the URL manually)

Screenshot from 2024-10-30 13-30-25
Screenshot from 2024-10-30 13-30-57

@jrasell jrasell added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui type/enhancement
Projects
Status: Needs Roadmapping
Status: Backlog
Development

No branches or pull requests

2 participants