Skip to content

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

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:explain-how-to-check-for-top-level-code
Sep 1, 2023
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:explain-how-to-check-for-top-level-code

Conversation

@potiuk

@potiuk potiuk commented Sep 1, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
@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