Skip to content

Conversation

@ptitzler
Copy link
Member

Improve the JSON-formatted output of the elyra-pipeline describe command. Previously custom component dependency metadata was reported as a string, which made it unnecessarily difficult for users to consume the information programatically.

Example:

$ elyra-pipeline describe --json my-airflow.pipeline

Old output:

   ...
   "dependencies": {
        "scripts": [],
        "notebooks": [],
        "files": [],
        "custom_components": [
            "{\"catalog_type\": \"airflow-package-catalog\", \"component_ref\": {\"airflow_package\": \"apache_airflow-1.10.15-py2.py3-none-any.whl\", \"file\": \"airflow/operators/bash_operator.py\"}}"
        ],
        "container_images": [],
        ...

New output:

    ...
    "dependencies": {
        "scripts": [],
        "notebooks": [],
        "files": [],
        "custom_components": [
            {
                "catalog_type": "airflow-package-catalog",
                "component_ref": {
                    "airflow_package": "apache_airflow-1.10.15-py2.py3-none-any.whl",
                    "file": "airflow/operators/bash_operator.py"
                }
            }
        ],
        "container_images": [],
        ...

Closes #2784

What changes were proposed in this pull request?

  • Render custom_components metadata as dictionary instead of string
  • Add new test case
  • Fix incompatible test pipeline

How was this pull request tested?

  • New test case
  • Manual testing using pipelines that utilize zero, one or more custom components.

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.

@ptitzler ptitzler added the component:cli-tools Command line tools label Aug 12, 2022
@ptitzler ptitzler added this to the 3.11.0 milestone Aug 12, 2022
@elyra-bot
Copy link

elyra-bot bot commented Aug 12, 2022

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

Copy link
Member

@kiersten-stokes kiersten-stokes left a comment

Choose a reason for hiding this comment

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

This looks so much better!

@ptitzler
Copy link
Member Author

This looks so much better!

... says the JSON parser 😉

@ptitzler ptitzler merged commit e357dff into elyra-ai:main Aug 17, 2022
@ptitzler ptitzler deleted the cli-describe branch August 17, 2022 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:cli-tools Command line tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants