-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot use go templates for job status output #24050
Comments
Hi @pgporada! Yup, that's working as expected (although we should probably document it). Go template works on the in-memory representation of the objects we're sending, so once we've serialized it to JSON it's no longer "structured" (to the CLI it's now just a string of bytes) and Go templates won't work anymore. |
How should that |
🤦 I'm having a whole morning of reading issue reports too quickly. I blame lack of coffee. You're right, if you're not also using the That'll let you do Go template evaluations like this, using this weirdly gnarly
Fixed in #24054 |
Cool, thank you! Cheers on ☕ |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Operating system and Environment details
Ubuntu 24.04
Issue
Reproduction steps
Outputting the job status with no flags works as intended.
Outputting json works too
Using the go template flag fails
Expected Result
That's a good question, I was just playing around seeing what I could output without needing to filter with grep or jq.
Actual Result
See above in reproduction steps
Job file (if appropriate)
N/A
Nomad Server logs (if appropriate)
N/A
Nomad Client logs (if appropriate)
N/A
The text was updated successfully, but these errors were encountered: