Skip to content

fix: Output template rendering fails with --parser-v1 flag#875

Draft
TIMMAREDDYDEEKSHITHA-ship-it wants to merge 2 commits intomainfrom
fix/issue-525-output-template-parser-v1
Draft

fix: Output template rendering fails with --parser-v1 flag#875
TIMMAREDDYDEEKSHITHA-ship-it wants to merge 2 commits intomainfrom
fix/issue-525-output-template-parser-v1

Conversation

@TIMMAREDDYDEEKSHITHA-ship-it
Copy link
Copy Markdown
Collaborator

@TIMMAREDDYDEEKSHITHA-ship-it TIMMAREDDYDEEKSHITHA-ship-it commented Apr 23, 2026

Description
Fixes #525

Problem

Output template rendering fails when using --parser-v1 flag with error: "nil pointer evaluating parser.PackContextable.job_name"

image

Solution

Added parser version check to use correct template context:

V1 parser: ConvertVariablesToMapInterface()
V2 parser: ToPackTemplateContext()

Changes

Modified: internal/pkg/renderer/renderer.go (added version check)
Added: internal/pkg/renderer/renderer_output_test.go (5 tests)

Testing

Template Rendering with V1 Parser

image

Job Deployment success

image image

Reminders

  • Add CHANGELOG.md entry
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

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

Successfully merging this pull request may close these issues.

failed to render output template using nomad-pack run command

1 participant