Skip to content

Prevent Session from staying opened between yields#65179

Merged
pierrejeambrun merged 2 commits intoapache:mainfrom
astronomer:fix/grid-stream-session-leak
Apr 14, 2026
Merged

Prevent Session from staying opened between yields#65179
pierrejeambrun merged 2 commits intoapache:mainfrom
astronomer:fix/grid-stream-session-leak

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

Follow up of: #65162

Based on Jarek idea, move the opening and closing of the session within the yield loop so connection isn't being held open on until the full response is downloaded.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Apr 13, 2026
@pierrejeambrun pierrejeambrun changed the title Prevent Session from being opened between yields Prevent Session from staying opened between yields Apr 13, 2026
@pierrejeambrun pierrejeambrun added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 13, 2026
@pierrejeambrun pierrejeambrun added this to the Airflow 3.2.1 milestone Apr 13, 2026
@pierrejeambrun pierrejeambrun force-pushed the fix/grid-stream-session-leak branch from 2a90f11 to e65457d Compare April 13, 2026 20:43
@pierrejeambrun pierrejeambrun force-pushed the fix/grid-stream-session-leak branch from e65457d to a1142a4 Compare April 13, 2026 20:47
Copy link
Copy Markdown
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Looks much better, thanks for the discussion (in Slack)!

@pierrejeambrun
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

Nice investigation and thanks for sharing the clips, makes me a lot comfortable

@pierrejeambrun pierrejeambrun merged commit 9813bf5 into apache:main Apr 14, 2026
141 checks passed
@pierrejeambrun pierrejeambrun deleted the fix/grid-stream-session-leak branch April 14, 2026 07:39
@github-actions
Copy link
Copy Markdown

Backport failed to create: v3-2-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 9813bf5 v3-2-test

This should apply the commit to the v3-2-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

pierrejeambrun added a commit to astronomer/airflow that referenced this pull request Apr 14, 2026
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants