Skip to content
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

make kfp dependency optional in build and during runs #3248

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

shalberd
Copy link
Contributor

@shalberd shalberd commented Sep 17, 2024

closes #3139
closes #3144

@mamurak @RHRolun I'd appreciate your opinion on this, too. @akchinSTC got me thinking on this separation and getting rid of the need to always include kfp in builds. It's working nicely for me in the context of Airflow-related Elyra builds.

  • kfp python package as optional dependency

  • defer processor loading until runtimes determined

  • make elyra.pipeline.kfp.kfp_authentication import optional for only when kfp available in build

  • tested with Elyra Dev 3.16 Build wheel file pip install with only package extra gitlab i.e. ELYRA_EXTRAS=[gitlab]

  • jupyter_elyra_config.py with only airflow activated:

# Configuration file for elyra.
# Pre-generated via `jupyter elyra --generate-config`
# Editted out the rest of the content, use the above command to get additional config sections.

c = get_config()  #noqa

#------------------------------------------------------------------------------
# PipelineProcessorRegistry(SingletonConfigurable) configuration
#------------------------------------------------------------------------------

c.PipelineProcessorRegistry.runtimes = ['airflow']

Working nicely at build and runtime for only airflow. no more kfp dependency for me that way when I only want airflow and possibly local processor.

Pip list in Jupyterlab, no more kfp and related packages:

Package                   Version
------------------------- --------------
aiofiles                  22.1.0
aiosqlite                 0.20.0
alembic                   1.13.2
annotated-types           0.7.0
ansicolors                1.1.8
anyio                     4.4.0
appengine-python-standard 1.1.6
archspec                  0.2.3
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
astroid                   3.2.4
asttokens                 2.4.1
async_generator           1.10
async-lru                 2.0.4
attrs                     24.2.0
autopep8                  2.0.4
Babel                     2.14.0
beautifulsoup4            4.12.3
black                     24.8.0
bleach                    6.1.0
blinker                   1.8.2
boltons                   24.0.0
Brotli                    1.1.0
cached-property           1.5.2
cachetools                5.5.0
certifi                   2024.8.30
certipy                   0.2.0
cffi                      1.17.1
charset-normalizer        3.3.2
click                     8.1.7
colorama                  0.4.6
comm                      0.2.2
conda                     24.7.1
conda-libmamba-solver     24.7.0
conda-package-handling    2.3.0
conda_package_streaming   0.10.0
contourpy                 1.3.0
cryptography              43.0.1
cycler                    0.12.1
debugpy                   1.8.5
decorator                 5.1.1
defusedxml                0.7.1
Deprecated                1.2.14
deprecation               2.1.0
dill                      0.3.8
distro                    1.9.0
docstring-to-markdown     0.15
elyra                     3.16.0.dev0
entrypoints               0.4
exceptiongroup            1.2.2
executing                 2.1.0
fastjsonschema            2.20.0
flake8                    7.1.1
fonttools                 4.53.1
fqdn                      1.5.1
frozendict                2.4.4
gitdb                     4.0.11
GitPython                 3.1.43
google-auth               2.34.0
greenlet                  3.1.0
h11                       0.14.0
h2                        4.1.0
hpack                     4.0.0
httpcore                  1.0.5
httpx                     0.27.2
hyperframe                6.0.1
idna                      3.9
importlib_metadata        8.5.0
importlib_resources       6.4.5
ipykernel                 6.29.5
ipython                   8.27.0
ipython_genutils          0.2.0
isoduration               20.11.0
isort                     5.13.2
jedi                      0.19.1
Jinja2                    3.1.4
json5                     0.9.25
jsonpatch                 1.33
jsonpointer               3.0.0
jsonschema                4.23.0
jsonschema-specifications 2023.12.1
jupyter_client            7.4.9
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_packaging         0.12.3
jupyter-resource-usage    0.7.2
jupyter_server            2.14.2
jupyter_server_fileid     0.9.3
jupyter-server-mathjax    0.2.6
jupyter_server_terminals  0.5.3
jupyter_server_ydoc       0.8.0
jupyter-ydoc              0.2.5
jupyterhub                5.1.0
jupyterlab                3.6.8
jupyterlab_git            0.44.0
jupyterlab-lsp            4.3.0
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
kiwisolver                1.4.7
libmambapy                1.5.9
Mako                      1.3.5
mamba                     1.5.9
MarkupSafe                2.1.5
matplotlib                3.9.2
matplotlib-inline         0.1.7
mccabe                    0.7.0
menuinst                  2.1.2
minio                     7.2.8
mistune                   2.0.5
mock                      5.1.0
mypy-extensions           1.0.0
nbclassic                 1.1.0
nbclient                  0.10.0
nbconvert                 7.1.0
nbdime                    3.2.1
nbformat                  5.10.4
nest_asyncio              1.6.0
networkx                  3.3
notebook                  6.5.7
notebook_shim             0.2.4
numpy                     2.1.1
oauthlib                  3.2.2
overrides                 7.7.0
packaging                 24.1
pamela                    1.2.0
pandas                    2.2.2
pandocfilters             1.5.0
papermill                 2.6.0
parso                     0.8.4
pathspec                  0.12.1
pexpect                   4.9.0
pickleshare               0.7.5
pillow                    10.4.0
pip                       24.2
pkgutil_resolve_name      1.3.10
platformdirs              4.3.3
pluggy                    1.5.0
prometheus_client         0.20.0
prompt_toolkit            3.0.47
protobuf                  5.28.1
psutil                    5.9.8
ptyprocess                0.7.0
pure_eval                 0.2.3
pyasn1                    0.6.1
pyasn1_modules            0.4.1
pycodestyle               2.12.1
pycosat                   0.6.6
pycparser                 2.22
pycryptodome              3.20.0
pycurl                    7.45.3
pydantic                  2.9.1
pydantic_core             2.23.3
pydocstyle                6.3.0
pyflakes                  3.2.0
PyGithub                  2.4.0
Pygments                  2.18.0
PyJWT                     2.9.0
pylint                    3.2.7
PyNaCl                    1.5.0
pyparsing                 3.1.4
PySocks                   1.7.1
python-dateutil           2.9.0
python-gitlab             4.11.1
python-json-logger        2.0.7
python-lsp-jsonrpc        1.1.2
python-lsp-server         1.12.0
pytoolconfig              1.3.1
pytz                      2024.2
PyYAML                    6.0.2
pyzmq                     26.2.0
referencing               0.35.1
requests                  2.32.3
requests-toolbelt         1.0.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rope                      1.13.0
rpds-py                   0.20.0
rsa                       4.9
ruamel.yaml               0.18.6
ruamel.yaml.clib          0.2.8
Send2Trash                1.8.3
setuptools                73.0.1
six                       1.16.0
smmap                     5.0.1
sniffio                   1.3.1
snowballstemmer           2.2.0
soupsieve                 2.5
SQLAlchemy                2.0.34
stack-data                0.6.2
tenacity                  9.0.0
termcolor                 2.3.0
terminado                 0.18.1
tinycss2                  1.3.0
tomli                     2.0.1
tomlkit                   0.13.2
tornado                   6.4.1
tqdm                      4.66.5
traitlets                 5.14.3
truststore                0.9.2
types-python-dateutil     2.9.0.20240906
typing_extensions         4.12.2
typing-utils              0.1.0
tzdata                    2024.1
ujson                     5.10.0
uri-template              1.3.0
urllib3                   1.26.20
watchdog                  5.0.2
wcwidth                   0.2.13
webcolors                 24.8.0
webencodings              0.5.1
websocket-client          1.8.0
whatthepatch              1.0.6
wheel                     0.44.0
wrapt                     1.16.0
y-py                      0.6.2
yapf                      0.40.2
yaspin                    3.0.2
ypy-websocket             0.8.4
zipp                      3.20.2
zstandard                 0.23.0

Output on jupyterlab start:

D 2024-09-17 17:54:52.905 ServerApp] Paths used for configuration of jupyter_notebook_config: 
    	/home/jovyan/.jupyter/jupyter_notebook_config.json
[I 2024-09-17 17:54:52.905 ServerApp] notebook_shim | extension was successfully linked.
[D 2024-09-17 17:54:52.906 ServerApp] Config changed: {'ExtensionApp': {'log_level': 'DEBUG'}, 'InlineBackend': {'figure_formats': {'png', 'jpeg', 'svg', 'pdf'}}, 'FileContentsManager': {'delete_to_trash': False}, 'PipelineProcessorRegistry': {'runtimes': ['airflow']}, 'NotebookApp': {}, 'ServerApp': {'log_level': 'DEBUG', 'ip': '0.0.0.0', 'open_browser': False, 'jpserver_extensions': <LazyConfigValue value={'jupyterlab': True, 'elyra': True, 'jupyter_lsp': True, 'jupyter_resource_usage': True, 'jupyter_server_fileid': True, 'jupyter_server_mathjax': True, 'jupyter_server_terminals': True, 'jupyter_server_ydoc': True, 'jupyterlab_git': True, 'nbclassic': True, 'nbdime': True, 'notebook_shim': True}>}}
[I 2024-09-17 17:54:52.962 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-09-17 17:54:52.962 ElyraApp] Config {'PipelineProcessorRegistry': {'runtimes': ['airflow']}, 'ServerApp': {'log_level': 'DEBUG', 'ip': '0.0.0.0', 'open_browser': False, 'jpserver_extensions': <LazyConfigValue value={'jupyterlab': True, 'elyra': True, 'jupyter_lsp': True, 'jupyter_resource_usage': True, 'jupyter_server_fileid': True, 'jupyter_server_mathjax': True, 'jupyter_server_terminals': True, 'jupyter_server_ydoc': True, 'jupyterlab_git': True, 'nbclassic': True, 'nbdime': True, 'notebook_shim': True}>}, 'ExtensionApp': {'log_level': 'DEBUG'}, 'InlineBackend': {'figure_formats': {'png', 'jpeg', 'svg', 'pdf'}}, 'FileContentsManager': {'delete_to_trash': False}}
[D 2024-09-17 17:54:53.087 ElyraApp] class_package_map = {'SlackAPIPostOperator': 'from airflow.operators.slack_operator import SlackAPIPostOperator', 'BashOperator': 'from airflow.operators.bash_operator import BashOperator', 'EmailOperator': 'from airflow.operators.email_operator import EmailOperator', 'SimpleHttpOperator': 'from airflow.operators.http_operator import SimpleHttpOperator', 'SparkSqlOperator': 'from airflow.contrib.operators.spark_sql_operator import SparkSqlOperator', 'SparkSubmitOperator': 'from airflow.contrib.operators.spark_submit_operator import SparkSubmitOperator'}
[I 2024-09-17 17:54:53.087 ElyraApp] Registering airflow processor 'elyra.pipeline.airflow.processor_airflow.AirflowPipelineProcessor'...
[I 2024-09-17 17:54:53.087 ElyraApp] Although runtime 'kfp' is installed, it is not in the set of configured runtimes ['airflow'] and will not be available.
[I 2024-09-17 17:54:53.087 ElyraApp] Although runtime 'local' is installed, it is not in the set of configured runtimes ['airflow'] and will not be available.
[D 2024-09-17 17:54:53.088 ElyraApp] CacheUpdateManager started...
[D 2024-09-17 17:54:53.098 ServerApp] Loading schemaspace 'code-snippets'...
[D 2024-09-17 17:54:53.099 ServerApp] Loading schemaspace 'component-catalogs'...
[D 2024-09-17 17:54:53.099 ServerApp] Loading schemaspace 'runtimes'...
[D 2024-09-17 17:54:53.099 ServerApp] Loading schemaspace 'runtimes-images'...
[D 2024-09-17 17:54:53.107 ServerApp] Loading SchemasProvider 'airflow-package-catalog-schema'...
[D 2024-09-17 17:54:53.108 ElyraApp] Reading Airflow package catalog connector schema from /opt/conda/lib/python3.11/site-packages/elyra/pipeline/airflow/package_catalog_connector/airflow-package-catalog.json
[D 2024-09-17 17:54:53.108 ServerApp] Validating schema 'airflow-package-catalog' of schemaspace component-catalogs...
[D 2024-09-17 17:54:53.109 ServerApp] Loading SchemasProvider 'airflow-provider-package-catalog-schema'...
[D 2024-09-17 17:54:53.109 ElyraApp] Reading Airflow provider package catalog connector schema from '/opt/conda/lib/python3.11/site-packages/elyra/pipeline/airflow/provider_package_catalog_connector/airflow-provider-package-catalog.json'
[D 2024-09-17 17:54:53.110 ServerApp] Validating schema 'airflow-provider-package-catalog' of schemaspace component-catalogs...
[D 2024-09-17 17:54:53.110 ServerApp] Loading SchemasProvider 'code-snippets'...
[D 2024-09-17 17:54:53.121 ServerApp] Validating schema 'code-snippet' of schemaspace code-snippets...
[D 2024-09-17 17:54:53.122 ServerApp] Loading SchemasProvider 'component-catalogs'...
[D 2024-09-17 17:54:53.129 ServerApp] Validating schema 'local-directory-catalog' of schemaspace component-catalogs...
[D 2024-09-17 17:54:53.130 ServerApp] Validating schema 'local-file-catalog' of schemaspace component-catalogs...
[D 2024-09-17 17:54:53.130 ServerApp] Validating schema 'url-catalog' of schemaspace component-catalogs...
[D 2024-09-17 17:54:53.131 ServerApp] Loading SchemasProvider 'runtimes'...
[D 2024-09-17 17:54:53.139 ServerApp] Validating schema 'airflow' of schemaspace runtimes...
[D 2024-09-17 17:54:53.139 ServerApp] Validating schema 'kfp' of schemaspace runtimes...
[D 2024-09-17 17:54:53.140 ServerApp] Loading SchemasProvider 'runtimes-images'...
[D 2024-09-17 17:54:53.148 ServerApp] Validating schema 'runtime-image' of schemaspace runtime-images...
[D 2024-09-17 17:54:53.149 ServerApp] Schemaspace 'component-catalogs' is using metadata directory: /home/jovyan/.local/share/jupyter/metadata/component-catalogs from list: ['/home/jovyan/.local/share/jupyter/metadata/component-catalogs', '/usr/local/share/jupyter/metadata/component-catalogs', '/usr/share/jupyter/metadata/component-catalogs', '/opt/conda/share/jupyter/metadata/component-catalogs']
[I 2024-09-17 17:54:53.150 ServerApp] elyra | extension was successfully loaded.
[D 2024-09-17 17:54:53.151 ServerApp] [lsp] rootUri will be file:///home/jovyan
[D 2024-09-17 17:54:53.151 ServerApp] [lsp] virtualDocumentsUri will be file:///home/jovyan/.virtual_documents
[I 2024-09-17 17:54:53.152 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-09-17 17:54:53.152 ServerApp] jupyter_resource_usage | extension was successfully loaded.
[I 2024-09-17 17:54:53.152 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2024-09-17 17:54:53.152 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /home/jovyan
[I 2024-09-17 17:54:53.152 FileIdExtension] ArbitraryFileIdManager : Configured database path: /home/jovyan/.local/share/jupyter/file_id_manager.db
[I 2024-09-17 17:54:53.153 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2024-09-17 17:54:53.153 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2024-09-17 17:54:53.156 FileIdExtension] Attached event listeners.
[I 2024-09-17 17:54:53.157 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2024-09-17 17:54:53.157 ServerApp] jupyter_server_mathjax | extension was successfully loaded.
[I 2024-09-17 17:54:53.157 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-09-17 17:54:53.158 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2024-09-17 17:54:53.160 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.11/site-packages/jupyterlab
[I 2024-09-17 17:54:53.160 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[D 2024-09-17 17:54:53.160 ServerApp] Paths used for configuration of default_setting_overrides: 
    	/etc/jupyter/labconfig/default_setting_overrides.json
[D 2024-09-17 17:54:53.161 ServerApp] Paths used for configuration of default_setting_overrides: 
    	/usr/local/etc/jupyter/labconfig/default_setting_overrides.json
[D 2024-09-17 17:54:53.161 ServerApp] Paths used for configuration of default_setting_overrides: 
    	/opt/conda/etc/jupyter/labconfig/default_setting_overrides.json
[D 2024-09-17 17:54:53.161 ServerApp] Paths used for configuration of default_setting_overrides: 
    	/home/jovyan/.local/etc/jupyter/labconfig/default_setting_overrides.json
[D 2024-09-17 17:54:53.161 ServerApp] Paths used for configuration of default_setting_overrides: 
    	/home/jovyan/.jupyter/labconfig/default_setting_overrides.json
[I 2024-09-17 17:54:53.162 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-09-17 17:54:53.164 ServerApp] jupyterlab_git | extension was successfully loaded

What changes were proposed in this pull request?

How was this pull request tested?

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

…til runtimes determined, make elyra.pipeline.kfp.kfp_authentication import optional only when kfp available in build

Signed-off-by: shalberd <21118431+shalberd@users.noreply.github.com>
@shalberd shalberd added component:build build and build related issues(dependencies and docker) impact:breaking change Delivery introduces a change that is not backward compatible and removed impact:breaking change Delivery introduces a change that is not backward compatible labels Sep 17, 2024
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Hi @shalberd - this is great - thank you!

My only comment is regarding a couple messages displayed in the console output example, who's statements I had expected to see in this PR (but also am now unfamiliar with elyra's logging, so must have been there):

[I 2024-09-17 17:54:53.087 ElyraApp] Although runtime 'kfp' is installed, it is not in the set of configured runtimes ['airflow'] and will not be available.
[I 2024-09-17 17:54:53.087 ElyraApp] Although runtime 'local' is installed, it is not in the set of configured runtimes ['airflow'] and will not be available.

These statements seem a little superfluous with respect to the PR and I'm not sure they provide any value. I'm also wonder what "runtime 'local' is installed" means. Is there an option not to install the 'local' runtime?

Similarly for 'kfp', now that I think about it. Do you happen to have output in which 'kfp' is not installed to really show the separation? I might be forgetting lower level details regarding deployment/installation.

Thanks,
Kevin.

@shalberd
Copy link
Contributor Author

shalberd commented Sep 18, 2024

Hi @kevin-bates that message, that a runtime is installed, but not used, is related to this work on PipelineProcessorRegistry config

https://github.com/elyra-ai/elyra/blob/main/elyra/pipeline/registry.py#L65

#3114

Basically, all runtimes (kfp, airflow, local) are always installed in terms of schemas

https://github.com/elyra-ai/elyra/tree/main/elyra/metadata/schemas

runtimeprocessors

https://github.com/elyra-ai/elyra/blob/main/elyra/pipeline/runtime_type.py#L25

and so on.

processor in entrypoints.get_group_all("elyra.pipeline.processors")processor in entrypoints.get_group_all("elyra.pipeline.processors")

They are just not enabled in the application config, not exposed and thus not called,

e.g. I disabled all runtimes except airflow by setting
c.PipelineProcessorRegistry.runtimes = ['airflow'] in elyra generated config.

Do you happen to have output in which 'kfp' is not installed to really show the separation?

In essence, in the Jupyterlab GUI, I was only able to see the the Airflow pipeline editor, custom components for Airflow only, and so on. No kfp-related stuff, no "run locally" - only "run in Airflow", that all seems correctly disabled, i.e. the code not being accessed, via that old PR 3114 that you and Patrick worked on back then.

Screenshot 2024-09-18 at 17 37 28 Screenshot 2024-09-18 at 17 38 42 Screenshot 2024-09-18 at 17 39 10

I can completely confirm the experience in terms of GUI from PR 3114, with the added bonus that now, the kfp-related python packages are not installed (see my pip list from the main body of this PR).

Now, for directory, filesystem, and url component catalog, I am still figuring out why those even appear when I run locally (I don't use them)

Screenshot 2024-09-18 at 17 41 31

and why the runtime kubeflow pipelines still appears there. That has nothing do do with existing code, though, I think. More with the schemas json. In Open Data Hub Workbench Images Jupyter Builds with Elyra, I was able to configure the runtimes in that dropwdown with a custom json component-runtime.json

https://github.com/opendatahub-io-contrib/workbench-images/snippets/ides/1-jupyter/files/utils/component_runtime.json

or I think we even disabled that completely (them for kfp in ODH, me for Airflow)

https://github.com/opendatahub-io-contrib/workbench-images/blob/main/snippets/ides/1-jupyter/jupyter.snippet#L46

@guimou @harshad16 what is the reason for disabling those component catalogs in custom workbench images? Is the fact that when the commands in the jupyter snippet are not executed and the custom json is put in, we see all types of component catalogs with all types a runtimes, is that a reaction to a deficiency in Elyra? i.e. you replace the two runtimes in the schema, e.g. at

https://github.com/elyra-ai/elyra/blob/main/elyra/metadata/schemas/local-directory-catalog.json#L40

with the value from

https://github.com/opendatahub-io-contrib/workbench-images/snippets/ides/1-jupyter/files/utils/component_runtime.json

I never used those three types of component catalogs (url, file, directory) with Airflow, in any case.

If it is a deficiency, maybe I could instead add programmatic logic to exclude runtimes in those schema configs, too, when parsing them, as configured in c.PipelineProcessorRegistry.runtimes = ['airflow']

As of now, I think, component_parser for those component catalogs just takes verbatim whatever is in the schema json / runtime_type enum

In my case, cause KUBEFLOW_PIPELINES single enum value is not in the list of c.PipelineProcessorRegistry.runtimes = ['airflow'] in my productive image, I do not even see the component catalogs filesystem, url directory in the list to select from.

historical:

https://github.com/elyra-ai/elyra/pull/2492/files#diff-07f9000bb2d16d86450ac498deb8951310fa7f07d3a467a5f86e413badd24250

@shalberd
Copy link
Contributor Author

shalberd commented Sep 18, 2024

There should be a better programmatic way to showing the runtimes sans-Airflow or sans-KFP in the schema catalogs than replacing them like this

https://github.com/opendatahub-io/notebooks/blob/main/jupyter/datascience/ubi9-python-3.9/Dockerfile#L62

in
metadata/schemas/local-directory-catalog.json
metadata/schemas/local-file-catalog.json
metadata/schemas/url-directory-catalog.json

I see ODH Elyra does not handle this programmatically currently as well, just by replacement in the json.

In any case, since the main goal here is to make kfp dependency optional in terms of installed python packages, and showing that only Airflow, but not KFP or local pipeline editor and runtime are shown when I only enable Airflow, I think the PR archieves what ticket #3139 wanted to achieve.

@shalberd
Copy link
Contributor Author

shalberd commented Oct 18, 2024

@harshad16 for ODH KFP installs, you can either keep installing with elyra[all], or, if Gitlab support is not wanted, with
[kfp,kfp-examples,kfp-tekton] old documentation: https://elyra.readthedocs.io/en/latest/getting_started/installation.html#packaging
Essentially, kfp has been made its own install option and kfp is not in the general dependencies anymore, which is nice for Airflow git-sync / elyra[gitlab] installs.
@kevin-bates @lresende @romeokienzler I will add a documentation PR to make that clear for https://github.com/elyra-ai/elyra/blob/main/docs/source/getting_started/installation.md

@paulovmr let me know so we can sync up with what you did downstream on odh-elyra.
opendatahub-io@642b436
You are doing the other way around: removing Airflow stuff, while I aim to remove KFP stuff, not in the code, but at install time in terms of libraries used.
My approach with the code is, as you see, to make conditional logic and loads depending on libraries.
Let us sync up here or in the Elyra calls, I think that would make sense.
Are you on Slack https://odh-io.slack.com?

I think removing code related to Airflow is a bit overkill downstream, maybe we can make the schema support more configurable. I did not have any issues with kfp code / processors running so far when working with the mods here w/o kfp and install option elyra[gitlab].

Copy link
Member

@lresende lresende left a comment

Choose a reason for hiding this comment

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

Looks good, let me play with it over the weekend and merge if nothing else.

Signed-off-by: Luciano Resende <lresende@apple.com>
pyproject.toml Show resolved Hide resolved
@shalberd
Copy link
Contributor Author

shalberd commented Nov 8, 2024

thank you so much, @lresende I have one small question for my personal understanding in the review files section pyproject, regarding airflow option and empty square brackets.
So nice you did the documentation for me, and nice idea with a more descriptive airflow / airflow-gitlab install option. Neat idea.

@lresende
Copy link
Member

lresende commented Nov 8, 2024

Yes, I initially got a little confused as we had a lot of details on [kfp] but nothing really on [airflow] so I made the empty one mostly for simetry and to clarify on the docs. ...

@lresende
Copy link
Member

lresende commented Nov 8, 2024

BTW, Just trying to get builds in green before merging...

@shalberd
Copy link
Contributor Author

shalberd commented Nov 8, 2024

ok, yes, I think it is good to have that airflow option, i.e. for core dependencies, and then airflow-gitlab for core dependencies plus python-gitlab.
It totally makes sense for simetry and in terms of usability.

@lresende lresende merged commit 7cc3270 into elyra-ai:main Nov 8, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:build build and build related issues(dependencies and docker)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make kfp dependency in elyra-server packaging optional
3 participants