hashicorp/nomad-pack

nomad-pack throws obtuse error when pack does not contain a parent template

attachmentgenie opened this issue · 1 comments

Due to a copy and past error we had some trouble getting a pack running. By mistake it didnt have a *.nomad.tpl file but merely all *.tpl files

❯ nomad-pack version
Nomad Pack v0.1.1 (5159a77)

reproduce

❯ nomad-pack generate pack foo
❯ nomad-pack {plan,render,run,destroy} foo

The workflow above works as expected now rename the foo.nomad.tpl file to foo.tpl and than plan or run (render actually still works as expected)

`
❯ mv foo/templates/foo.nomad.tpl foo/templates/foo.tpl
❯ nomad-pack render foo <- shows job output correctly
❯ nomad-pack plan foo
! No Templates Rendered

Error:   no templates were rendered by the renderer process run
Context: 
    - Registry Name: <<local folder>>
    - Pack Name: foo
    - Pack Ref: <<none>>
    - Pack Path: /home/attachmentgenie/DevShed/StufisGeneralis/foo
    - Deployment Name: foo

`
The error presented isnt very clear as to what is actually happening or what nomad-pack is complaining about

Right, this makes sense, because pack needs the extension to know which outputs plannable job specifications that can be planned. Since the job template lacked an extension, it gets rendered as a non-job template. I'll see about improving this error message so that it is clearer.