Cannot use KubernetesPodOperator as superclass when defining new components #3109
Labels
component:pipeline-editor
pipeline editor
component:pipeline-runtime
issues related to pipeline runtimes e.g. kubeflow pipelines
platform: pipeline-Airflow
Related to usage of Apache Airflow as pipeline runtime
status:Needs Triage
Describe the issue
In this scenario I want to make a new Airflow component that is based on (inherits from) the KubernetesPodOperator.
After the .py file definition and component registering, it is not displayed in the available components of the Visual Editor. As far as I can understand the issue lays in this regex pattern that fails to add KubernetesPodOperator to the operator_bases list, which then does not add the class to the operator_classes list.
Inside the
elyra.pipeline.airflow.component_parser_airflow.py
the_filter_operator_classes
function has the following regex patterns for adding extra operator bases:and a quick test shows that it does not identify correctly the kubernetes pod import:
As far as I am concerned a quick fix would be to just add a dot (.) to the pattern - tho I might be missing some perspective, as follows:
The pattern would change from
[a-zA-Z0-9_]
to[a-zA-Z0-9_.]
that then should give the desired result.Also on a bit of a side quest: it would be really nice if it would be possible to extend that list of patterns, or somehow be able to add own operator sources - given that at some point they inherit from BaseOperator,
Deployment information
Describe what you've deployed and how:
Pipeline runtime environment
The text was updated successfully, but these errors were encountered: