-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Allow templating for more arguments in RunPipelineJobOperator #50206
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
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
the fields "template_path", "pipeline_root", "parameter_values", "service_account" where added to allow jinja templating these args.
There exists also a discussion for this: #48627 |
the fields "template_path", "pipeline_root", "parameter_values", "service_account" where added to allow jinja templating these args.
I don't see a problem adding these fields to template fields. @MaksYermak do you remember why they were not template field at the beginning? |
At the beginning we, always, don't know what fields users want to have as templated. We add only the most useful to |
Hi @ferenc-hechler shall I assign this issue to you if you want to create a PR for this? |
There is already a PR for this: #50220 |
* issue #50206: add more template_fields to RunPipelineJobOperator the fields "template_path", "pipeline_root", "parameter_values", "service_account" where added to allow jinja templating these args. * add new template_fields to unit tests * rollback templating tests for wrong operator --------- Co-authored-by: feri <feri@DESKTOP-QSATAT0.speedport.ip>
Apache Airflow Provider(s)
google
Versions of Apache Airflow Providers
No response
Apache Airflow version
2.10.2
Operating System
GCP Composer 2.9.11
Deployment
Google Cloud Composer
Deployment details
No response
What happened
I tried to use jinja templating to set parameters like "template_path", "pipeline_root" or "service_account".
The templates are not replaced with actual values, instead of service_account is set to the string
{{ var.value... }}
.What you think should happen instead
templates should also be supported for these fields and the value of the environment variable should be given.
How to reproduce
Executing the following task fails:
The AirFlow variable
KFP_TEMPLATE_URL
is set to a valid template uploaded to an Kubeflow Pipeline Artifact Registry.In the error message it is to see, that template_path was not resolved.
invalid URL "{{ var.value.KFP_TEMPLATE_URL }}"
Anything else
I was able to activate templating by inheriting the RunPipelineJobOperator and extend the class variable tempalte_fields:
airflow/providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py
Lines 110 to 115 in e9c49d6
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: