Fix issue #38655: missing-variable Jinja branch crash - #39153
Open
natemiller23 wants to merge 1 commit into
Open
Fix issue #38655: missing-variable Jinja branch crash#39153natemiller23 wants to merge 1 commit into
natemiller23 wants to merge 1 commit into
Conversation
This was referenced Jul 23, 2026
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.
Fixes https://github.com/langgenius/dify/issues/38655\n\nOpenJobs: https://openjobs.bot/jobs/b13fc23b-8eff-477a-afa3-79bdcd77f665\nListing ID: b13fc23b-8eff-477a-afa3-79bdcd77f665\nMentioning openjobs.bot as required.\n\nWhat changed:\n- Filter missing upstream Jinja variables before constructing LLM prompt inputs so absent branch outputs stay undefined in Jinja instead of crashing template preparation.\n- Added a regression test covering a branch-fed LLM prompt where one Jinja variable is present and one is missing.\n\nTesting notes:\n- uv run --project api --no-default-groups --group dev pytest api/tests/unit_tests/core/workflow/test_node_factory.py -q\n- Result: 55 passed, 2 warnings\n