elyra icon indicating copy to clipboard operation
elyra copied to clipboard

elyra-pipeline 'describe' CLI command: improve custom component output

Open ptitzler opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

The elyra-pipeline describe CLI command lists (among other things) external pipeline dependencies, such as Kubernetes resources and custom components.

The command output for custom components is a JSON dump of the component_source property value:

$ elyra-pipeline describe custom-kfp.pipeline
...
Component dependencies:
    - {"catalog_type": "url-catalog", "component_ref": {"url": "https://raw.githubusercontent.com/elyra-ai/examples/master/component-catalog-connectors/kfp-example-components-connector/kfp_examples_connector/resources/download_data.yaml"}}
...
$ elyra-pipeline describe --json custom-kfp.pipeline
...
    "dependencies": {
        "scripts": [],
        ...
        "custom_components": [
            "{\"catalog_type\": \"url-catalog\", \"component_ref\": {\"url\": \"https://raw.githubusercontent.com/elyra-ai/examples/master/component-catalog-connectors/kfp-example-components-connector/kfp_examples_connector/resources/download_data.yaml\"}}"
        ],
        ...
...

Describe the solution you'd like

For human-readable output:

  • Render the value of the catalog_type property and the value of the component_ref property in a more user-friendly way

For machine-readable output (JSON):

  • Convert the component information string to JSON.For the example above the output would be:
     "custom_components": [
             {
               "catalog_type": "url-catalog", 
               "component_ref": {
                   "url": "https://raw.githubusercontent.com/elyra-ai/examples/.../download_data.yaml"
                }
             }
    ],
    

ptitzler avatar Jun 14 '22 22:06 ptitzler