You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Shrividya (via GitHub)" <gi...@apache.org> on 2026/03/24 04:03:49 UTC
Re: [PR] Docs: Fix inconsistency in documents when using `BashOperator` with Jinja templating [airflow]
Shrividya commented on code in PR #64129:
URL: https://github.com/apache/airflow/pull/64129#discussion_r2978857235
##########
airflow-core/docs/core-concepts/dag-run.rst:
##########
@@ -271,7 +271,8 @@ Example of a parameterized Dag:
parameterized_task = BashOperator(
task_id="parameterized_task",
- bash_command="echo value: {{ dag_run.conf['conf1'] }}",
+ bash_command="echo \"here is the message: '$message'\"",
+ env={"message": '{{ dag_run.conf["message"] if dag_run else "" }}'},
Review Comment:
nice catch!
nit: better to keep `env={"message": "{{ dag_run.conf.get('message', 'no message provided') }}"} ` to pass the value as an environment variable, just to keep the bash_command clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org