Skip to content

fix: add missing await on render_template service call#344

Merged
privateip merged 1 commit intoitential:develfrom
fordjes:fix/issue-336-render-template-missing-await
Mar 18, 2026
Merged

fix: add missing await on render_template service call#344
privateip merged 1 commit intoitential:develfrom
fordjes:fix/issue-336-render-template-missing-await

Conversation

@fordjes
Copy link
Contributor

@fordjes fordjes commented Mar 10, 2026

Summary

  • render_template() called client.configuration_manager.render_template() without await, returning a coroutine object instead of the rendered string
  • Because RenderTemplateResponse.result is typed as str, Pydantic raised ValidationError: Input should be a valid string, input_type=coroutine
  • In a looser-typed model this would silently return a coroutine repr string — a subtle data-correctness failure with no exception to signal the problem
  • Added await and 6 regression tests

Test plan

  • make ci passes on the branch
  • New tests in tests/test_tools_configuration_manager.py verify the tool awaits its service call
  • render_template returns the correctly rendered string against a live IAP instance

Fixes #336

🤖 Generated with Claude Code

render_template() called client.configuration_manager.render_template()
without await, returning a coroutine object instead of the rendered
string. Because RenderTemplateResponse.result is typed as str, Pydantic
raised ValidationError: Input should be a valid string, input_type=coroutine.
In a looser-typed model this would silently return a coroutine repr
string — a subtle data-correctness failure.

Closes itential#336

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fordjes fordjes requested a review from a team as a code owner March 10, 2026 21:06
@privateip privateip merged commit c038a8b into itential:devel Mar 18, 2026
5 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.

fix: render_template returns coroutine instead of rendered output due to missing await

2 participants