Skip to content

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Jul 2, 2025

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_requests dictionary. This caused a KeyError when the Jinja2 template tried to access user_logins for PRs that had no corresponding user data.

The fix ensures that pr_list variable only contains PRs that have corresponding entries in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where breeze release-management generate-issue-content-core command failed with "UndefinedError: dict object has no element <PR_NUMBER>".

Error (before the fix):

image

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

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_requests` dictionary. This caused a `KeyError` when the Jinja2 template
tried to access `user_logins` for PRs that had no corresponding user data.

The fix ensures that `pr_list` variable only contains PRs that have corresponding entries
in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where `breeze release-management generate-issue-content-core`
command failed with "UndefinedError: dict object has no element <PR_NUMBER>".
@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Jul 2, 2025
@kaxil kaxil requested a review from eladkal July 2, 2025 21:58
@potiuk potiuk merged commit 19da281 into apache:main Jul 3, 2025
103 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 3, 2025
…2751)

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_requests` dictionary. This caused a `KeyError` when the Jinja2 template
tried to access `user_logins` for PRs that had no corresponding user data.

The fix ensures that `pr_list` variable only contains PRs that have corresponding entries
in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where `breeze release-management generate-issue-content-core`
command failed with "UndefinedError: dict object has no element <PR_NUMBER>".
(cherry picked from commit 19da281)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@github-actions
Copy link

github-actions bot commented Jul 3, 2025

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jul 3, 2025
…ache#52751)

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_requests` dictionary. This caused a `KeyError` when the Jinja2 template
tried to access `user_logins` for PRs that had no corresponding user data.

The fix ensures that `pr_list` variable only contains PRs that have corresponding entries
in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where `breeze release-management generate-issue-content-core`
command failed with "UndefinedError: dict object has no element <PR_NUMBER>".
(cherry picked from commit 19da281)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
potiuk pushed a commit that referenced this pull request Jul 12, 2025
…2751)

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_requests` dictionary. This caused a `KeyError` when the Jinja2 template
tried to access `user_logins` for PRs that had no corresponding user data.

The fix ensures that `pr_list` variable only contains PRs that have corresponding entries
in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where `breeze release-management generate-issue-content-core`
command failed with "UndefinedError: dict object has no element <PR_NUMBER>".
(cherry picked from commit 19da281)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
potiuk pushed a commit that referenced this pull request Jul 12, 2025
…2751) (#52756)

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_requests` dictionary. This caused a `KeyError` when the Jinja2 template
tried to access `user_logins` for PRs that had no corresponding user data.

The fix ensures that `pr_list` variable only contains PRs that have corresponding entries
in the users dictionary, preventing the template from accessing undefined keys.

Fixes issue where `breeze release-management generate-issue-content-core`
command failed with "UndefinedError: dict object has no element <PR_NUMBER>".
(cherry picked from commit 19da281)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@kaxil kaxil deleted the fix-bug-issue-creation branch December 31, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants