Skip to content

runtime: raise TemplateRuntimeError from kci_raise - #3166

Open
giri256 wants to merge 1 commit into
kernelci:mainfrom
giri256:fix/jinja-template-runtime-error
Open

runtime: raise TemplateRuntimeError from kci_raise#3166
giri256 wants to merge 1 commit into
kernelci:mainfrom
giri256:fix/jinja-template-runtime-error

Conversation

@giri256

@giri256 giri256 commented Jul 26, 2026

Copy link
Copy Markdown

Fixes #1797.

The kci_raise Jinja helper currently raises a generic Exception, which loses the template-specific error type expected by Jinja callers.

This changes both the current runtime helper and the legacy LAVA helper to raise jinja2.TemplateRuntimeError. Focused regression tests cover both registrations.

Tests:

  • pytest tests/test_runtime.py -q — 18 passed
  • pre-commit run --files kernelci/runtime/__init__.py kernelci/legacy/lava/__init__.py tests/test_runtime.py — passed
  • pytest tests -q — 139 passed, 7 unrelated Windows-only failures (os.getuid, POSIX path expectations, and slash handling)
  • git diff --check

Signed-off-by: Giridhar <80974392+giri256@users.noreply.github.com>
@giri256
giri256 force-pushed the fix/jinja-template-runtime-error branch from e16e5f4 to 94ddea3 Compare July 26, 2026 21:35
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.

Replace generic Exception with a Jinja2 one in kci_raise

1 participant