[v3-0-test] Dev: Fix KeyError in release issue content generation (#52751) #52756
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.
When generating issue content for releases, some PRs were being filtered out
during processing (e.g., dependabot PRs, doc-only PRs) but still remained in
the
pull_requestsdictionary. This caused aKeyErrorwhen the Jinja2 templatetried to access
user_loginsfor PRs that had no corresponding user data.The fix ensures that
pr_listvariable only contains PRs that have corresponding entriesin the users dictionary, preventing the template from accessing undefined keys.
Fixes issue where
breeze release-management generate-issue-content-corecommand failed with "UndefinedError: dict object has no element <PR_NUMBER>".
(cherry picked from commit 19da281)
Co-authored-by: Kaxil Naik kaxilnaik@gmail.com