Fix/issue 510 improve error message#831
Open
TIMMAREDDYDEEKSHITHA-ship-it wants to merge 6 commits intomainfrom
Open
Fix/issue 510 improve error message#831TIMMAREDDYDEEKSHITHA-ship-it wants to merge 6 commits intomainfrom
TIMMAREDDYDEEKSHITHA-ship-it wants to merge 6 commits intomainfrom
Conversation
hashi-divyansh
requested changes
Mar 16, 2026
Member
hashi-divyansh
left a comment
There was a problem hiding this comment.
@TIMMAREDDYDEEKSHITHA-ship-it Added my comment.
Missing implementation for render cmd.
Collaborator
Author
here 'render' command has different behaviour - it succeeds if it renders either parent templates or dependent pack templates. Since it has different validation logic, I kept existing generic error message for it. The improved error message specifically addresses issue in #510 which affects 'plan' and 'run' commands where parent templates are strictly required |
- Add nomadVariable() function to retrieve specific variable - Add nomadVariables() function to list all variables - Add comprehensive unit tests with mocked API - Verify integration with live Nomad cluster - Update documentation with usage examples Closes #409
- Added ErrNoParentTemplates error constant - Enhanced error message to explain .nomad.tpl naming requirement - Shows template naming convention rules with examples - Lists actual template files found in templates/ directory - Provides specific guidance on how to fix the issue - Applied to both plan and run commands for consistency The new error message clearly shows users: 1. What went wrong (no .nomad.tpl files) 2. The naming convention rules 3. Which files exist that need renaming 4. How to fix the issue This replaces the previous unclear 'no templates were rendered' error that left users confused for hours. Fixes #510
f3b90f3 to
5a56c0b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #510
Problem
Users were confused by the unclear error "no templates were rendered by the renderer process run" when their pack lacked
.nomad.tplfiles. This led to hours of debugging, as reported in the issue.Solution
Enhanced the error message to:
.nomad.tplfiles are required for parent templatesChanges
ErrNoParentTemplateserror constant ininternal/pkg/errors/ui_context.goplancommand (internal/cli/plan.go)runcommand (internal/cli/run.go)pack renders successfully with .nomad.tpl file
Reproducing the error ->
File structure after renaming (missing .nomad.tpl)
After: Improved Error Message ->
Running nomad-pack plan now shows clear, actionable error
Reminders
CHANGELOG.mdentryChanges to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.