You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "henry3260 (via GitHub)" <gi...@apache.org> on 2026/08/31 13:27:04 UTC
[PR] Remove unreachable break in get_bagged_dag [airflow]
henry3260 opened a new pull request, #72332:
URL: https://github.com/apache/airflow/pull/72332
## Why
The second bundle loop in `get_bagged_dag` ends with:
```python
if dag := dagbag.dags.get(dag_id):
return dag
if dag:
break
```
The walrus assignment returns as soon as a Dag is found, so `if dag:` is only ever reached when `dag` is falsy — the `break` cannot run. The first bundle loop in the same function already uses the plain early return, so removing it also makes the two loops read the same way.
## What
- `airflow-core/src/airflow/utils/cli.py`: dropped the unreachable `if dag: break` from `get_bagged_dag`. No behavior change — the intent (stop searching once the Dag is found) is already served by the `return`, so no tests are added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unreachable break in get_bagged_dag [airflow]
Posted by "henry3260 (via GitHub)" <gi...@apache.org>.
henry3260 commented on PR #72332:
URL: https://github.com/apache/airflow/pull/72332#issuecomment-6234547121
Thanks for review, I will resolve conflicts and merged when CI green :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unreachable break in get_bagged_dag [airflow]
Posted by "henry3260 (via GitHub)" <gi...@apache.org>.
henry3260 merged PR #72332:
URL: https://github.com/apache/airflow/pull/72332
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unreachable break in get_bagged_dag [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #72332:
URL: https://github.com/apache/airflow/pull/72332#issuecomment-6247965861
### Backport successfully created: v3-4-test
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
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](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-4-test</td>
<td><a href="https://github.com/apache/airflow/pull/74981"><img src="https://img.shields.io/badge/PR-74981-blue" alt="PR Link"></a></td>
</tr>
</table>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org