Skip to content

Conversation

@Taragolis
Copy link
Contributor

Some small side effect with warnings after #37297.
@task.bash constantly warns even if multiple_outputs doesn't set

In addition change stack level to show in which file this decorator use

stacklevel=1

/opt/airflow/airflow/models/baseoperator.py:445 UserWarning: `multiple_outputs=True` is not supported in @task.bash tasks. Ignoring.

stacklevel=3

/files/dags/sample_bash.py:14 UserWarning: `multiple_outputs=True` is not supported in @task.bash tasks. Ignoring.

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

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

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

Good catch!

@Taragolis
Copy link
Contributor Author

Good catch!

I've thinking maybe it is also a good idea to explicit provide into the super().__init__(..., multiple_outputs=False)

@Taragolis Taragolis merged commit ff40c06 into apache:main Mar 5, 2024
@Taragolis Taragolis deleted the bash-decorator-multiple-outputs-true branch March 5, 2024 08:20
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Mar 6, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.8.3 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants