Skip to content

Re-add section on getting Context in Taskflow API#49240

Merged
kaxil merged 1 commit intoapache:mainfrom
astronomer:re-add-section-on-getting-context
Apr 14, 2025
Merged

Re-add section on getting Context in Taskflow API#49240
kaxil merged 1 commit intoapache:mainfrom
astronomer:re-add-section-on-getting-context

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Apr 14, 2025

Was removed by mistake in #49170 and caused failures on main due to cross references


============================== apache-airflow-providers-standard ==============================
------------------------------ Error   1 --------------------
 WARNING: undefined label: 'taskflow/accessing_context_variables'

File path: /opt/airflow/providers/standard/docs/operators/bash.rst:85

  80 |             :language: python
  81 |             :dedent: 4
  82 |             :start-after: [START howto_operator_bash_template]
  83 |             :end-before: [END howto_operator_bash_template]
  84 |
> 85 | Using the ``@task.bash`` TaskFlow decorator allows you to return a formatted string and take advantage of
  86 | having all :ref:`execution context variables directly accessible to decorated tasks <taskflow/accessing_context_variables>`.
  87 |
  88 | .. exampleinclude:: /../../../airflow-core/src/airflow/example_dags/example_bash_decorator.py
  89 |     :language: python
  90 |     :dedent: 4

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

Was removed by mistake in apache#49170 and caused failures on main due to cross references

```

============================== apache-airflow-providers-standard ==============================
------------------------------ Error   1 --------------------
 WARNING: undefined label: 'taskflow/accessing_context_variables'

File path: /opt/airflow/providers/standard/docs/operators/bash.rst:85

  80 |             :language: python
  81 |             :dedent: 4
  82 |             :start-after: [START howto_operator_bash_template]
  83 |             :end-before: [END howto_operator_bash_template]
  84 |
> 85 | Using the ``@task.bash`` TaskFlow decorator allows you to return a formatted string and take advantage of
  86 | having all :ref:`execution context variables directly accessible to decorated tasks <taskflow/accessing_context_variables>`.
  87 |
  88 | .. exampleinclude:: /../../../airflow-core/src/airflow/example_dags/example_bash_decorator.py
  89 |     :language: python
  90 |     :dedent: 4
```
@kaxil kaxil force-pushed the re-add-section-on-getting-context branch from c419f60 to db3dca9 Compare April 14, 2025 17:36
@kaxil
Copy link
Member Author

kaxil commented Apr 14, 2025

Ran locally

#################### Fetching inventories ####################
Nothing to do
#################### Documentation will be built for 2 package(s)with up to 10 parallel jobs, ####################
1. apache-airflow
2. apache-airflow-providers-standard
#################### Cleaning documentation files ####################
apache-airflow                                              : Cleaning files
apache-airflow-providers-standard                           : Cleaning files
#################### Scheduling documentation to build ####################
apache-airflow                                              : Scheduling documentation to build
apache-airflow-providers-standard                           : Scheduling documentation to build
#################### Running docs building ####################

apache-airflow                                              : Building documentation
apache-airflow-providers-standard                           : Building documentation
apache-airflow-providers-standard                           : Finished docs building successfully
apache-airflow                                              : Finished docs building successfully
No packages to retry. No more passes are needed.
No packages to retry. No more passes are needed.

@kaxil kaxil merged commit f8c3bbc into apache:main Apr 14, 2025
2 checks passed
@kaxil kaxil deleted the re-add-section-on-getting-context branch April 14, 2025 17:39
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants