Skip to content

feat(templates): implement custom template loader and executor (#565)#702

Draft
ArangoGutierrez wants to merge 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:feat/565-custom-template-loader
Draft

feat(templates): implement custom template loader and executor (#565)#702
ArangoGutierrez wants to merge 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:feat/565-custom-template-loader

Conversation

@ArangoGutierrez
Copy link
Collaborator

Summary

  • Implement LoadCustomTemplate() supporting inline, file, and URL sources with SHA256 checksum verification
  • Implement CustomTemplateExecutor that generates bash scripts with [CUSTOM] log prefix, environment variable exports (shell-quoted with %q), and continueOnError handling
  • Add fetchURL() with 60s timeout and 10MB response limit for URL-sourced templates

Test plan

  • TestLoadCustomTemplate_Inline - inline source loading
  • TestLoadCustomTemplate_File - absolute file path loading
  • TestLoadCustomTemplate_FileRelative - relative file path with baseDir resolution
  • TestLoadCustomTemplate_FileNotFound - error on missing file
  • TestLoadCustomTemplate_ChecksumMatch - SHA256 verification passes
  • TestLoadCustomTemplate_ChecksumMismatch - SHA256 verification fails
  • TestCustomTemplateExecute - script generation with env vars and logging
  • TestCustomTemplateExecute_ContinueOnError - error handling wrapper generation
  • go build ./... passes
  • go vet ./... passes

Related

…A#565)

LoadCustomTemplate supports inline, file, and URL sources with SHA256
checksum verification. CustomTemplateExecutor generates bash script
with env vars, logging, and continueOnError support.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
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.

1 participant