Skip to content

runtime: raise TemplateRuntimeError from kci_raise - #3166

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
giri256:fix/jinja-template-runtime-error
Jul 30, 2026
Merged

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

Conversation

@giri256

@giri256 giri256 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

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
@nuclearcat

Copy link
Copy Markdown
Member

Fixes #1797

@nuclearcat
nuclearcat added this pull request to the merge queue Jul 30, 2026
Merged via the queue into kernelci:main with commit c1d1ebc Jul 30, 2026
3 checks passed
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

2 participants