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

failed to render output template using nomad-pack run command #525

Open
ruslan-y opened this issue Jun 18, 2024 · 3 comments
Open

failed to render output template using nomad-pack run command #525

ruslan-y opened this issue Jun 18, 2024 · 3 comments

Comments

@ruslan-y
Copy link

Hi there!

We updated to nomad-pack version 0.1.2 and now we're getting the error:

  Job 'example-job' in pack deployment 'example' registered successfully
Pack successfully deployed. Use ./packs/example to manage this deployed instance with plan, stop, destroy, or info
! Failed To Render Output Template
!   Error: failed to render outputs.tpl: template: outputs.tpl:1:6: executing "outputs.tpl" at <.my.job_name>: nil pointer evaluating parser.PackContextable.job_name
!   Context:
!     Pack Name: example
Cleaning up project directory and file based variables

ERROR: Job failed: exit code 1

Meanwhile the deployment is going well.

The problem does not occur when calling nomad-pack render --parser-v1, but does occur when calling nomad-pack run --parser-v1
This has been present in nomad-pack since version 0.1.0, in which the --parser-v1 flag appeared.

Сontents of the outputs.tpl file:

[[ .my.job_name ]]:[[ .my.version ]] has been successfully deployed.

There are [[ .my.count ]] instances of your job now running on Nomad in [[ .my.namespace ]] namespace.
@slonopotamus
Copy link
Contributor

You need to use new syntax instead of .my.blabla.

@betterthanbreakfast
Copy link

betterthanbreakfast commented Jul 9, 2024

You need to use new syntax instead of .my.blabla.

As mentioned above, we use --parser-v1 flag to render using old parser to keep back-compatibility for packs, that currently in update queue for new render engine.

@slonopotamus
Copy link
Contributor

Oh, sorry, I misread your message where you said that render works but run doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants