UI block in job specification does not render

Hello,

I am trying to use the UI block to display additional information in the job page in the Nomad web UI.
As per the documentation, I am adding the ui { ... } block in my job definition, however this does not get displayed on the actual web page.
Are there any requirements to have this block rendered?

I am running Nomad v1.8.2

Thanks in advance!

Hey @cipz, if you’re using Nomad 1.8.x+ this should be working. Could you let me know a couple things?

  • Are you running Nomad Pack at all to manage/run your job? If so, what version?
  • Are you able to run, from the UI, the “Variables” job from default job templates? It has a ui block in it, and should render.

Barring that: could you let me know roughly what your job spec looks like, and if any console errors appear in your browser when you load the job page?

Hello @phil.renaud:

  • yes, I am running nomad-pack, version 0.2.0
  • I do not have the “Variables” job in my setup (unless I’m looking for it in the wrong place)

Although it does not render, I do see the ui block in the job spec under the Definition tab, and correctly indented. It is not present in the full specification. If I edit the definition itself and plan the job from the nomad web ui, however it renders correctly as it also shows up in the full specification.

There are no relevant errors in the browser console.

As far as the job spec here is the simplified structure:


variable "CI_JOB_URL" {
  type = string
  description = "url of ci related to the job"
}

variable "VERSION" {
  type = string
  description = "Which version to be installed"
}


job "job-run" {
    
    meta {
        version = "${var.VERSION}"
        github_job_url = "${var.CI_JOB_URL}"
    }

    ui {
      description = "Very accurate description for job related to version ${var.VERSION}"
      link {
        label = "CI JOB URL"
        url   = "${var.CI_JOB_URL}"
      }
    }
    
    
    group "group-of-tasks" {

        [ ... ]

    }   
}

I am triggering the job via nomad cli.

This all looks good to me, and I’ve been unable to reproduce the error (running pack 0.20 and Nomad 1.9.x) ;

Any chance it has to do with interpolation problems with the variables? Does your metadata show up with correct version and url? (is there any difference if you pass a default="..." into the variable block declarations?