Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain the users how they can check if python code is top-level #34006

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Sep 1, 2023

Many users have problem with it. Adding the way how they can check it easily.


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

Many users have problem with it. Adding the way how they can
check it easily.
Comment on lines +219 to +222
operator = PythonOperator(
task_id=get_task_id(),
python_callable=get_array,
dag=dag,
Copy link
Contributor

Choose a reason for hiding this comment

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

From what I gather from #33997 the confusion is more around templated parameters or parameters in general?

I wonder if the author question was more around this case:

      operator = PythonOperator(
          task_id=get_task_id(),
          python_callable=get_array,
          op_kwargs={"0": my_func()}  # <- this one
          dag=dag,

Copy link
Member Author

Choose a reason for hiding this comment

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

Could be .. but the mechanism of checking it is the same. If they add print in my_func() they will also see it.

@potiuk potiuk added this to the Airflow 2.7.1 milestone Sep 1, 2023
@potiuk potiuk merged commit 9702a14 into apache:main Sep 1, 2023
42 checks passed
@potiuk potiuk deleted the explain-how-to-check-for-top-level-code branch September 1, 2023 13:31
@ephraimbuddy ephraimbuddy added the type:doc-only Changelog: Doc Only label Sep 1, 2023
ephraimbuddy pushed a commit that referenced this pull request Sep 1, 2023
)

Many users have problem with it. Adding the way how they can
check it easily.

(cherry picked from commit 9702a14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants