Skip to content

Conversation

@ramitkataria
Copy link
Contributor

@ramitkataria ramitkataria commented Apr 8, 2025

After #46584, @task.branch started failing with DownstreamTasksSkipped exception in system tests. So this refactor is to stop those system tests using @task.branch from failing. As a bonus, this also makes the code cleaner!


^ 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.

There was a change in `@task.branch` that removed its support from
system tests. So this refactor is to stop those system tests using
`@task.branch` from failing. As a bonus, this also makes the code
cleaner!
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Apr 8, 2025
@o-nikolas
Copy link
Contributor

There was a change in @task.branch that removed its support from system tests.

Do you have a link to the change?

@ramitkataria
Copy link
Contributor Author

Yep, here: #46584

@ferruzzi
Copy link
Contributor

ferruzzi commented Apr 9, 2025

That definitely looks like a better way to handle it. I haven't used short_circuit before, can you confirm that it is only short-circuiting the tasks in that task_group and not the entire rest of the dag/test? I wonder how hard it would be (not in this PR, just Some Day:tm:) to add the same run_if, and skip_if options to the task_group decorator.

I'll be traveling the rest of the week; assuming it is confirmed that it only short-circuits the group and not the whole remaining dag, feel free to consider this an approval vote.

@ramitkataria
Copy link
Contributor Author

Yes, I tested and confirmed that the rest of the dag still runs.
And yea, run_if and skip_if would be nice to have for task groups but I'm also not sure how hard it would be

@vincbeck vincbeck merged commit f1a12f1 into apache:main Apr 9, 2025
66 checks passed
@vincbeck vincbeck deleted the ramitkataria/refactor-task-branch branch April 9, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants