Skip to content

feat(sdk)!: make CLI output consistent, readable, and usable #7739

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

Merged
merged 7 commits into from
May 20, 2022

Conversation

connor-mccarthy
Copy link
Member

@connor-mccarthy connor-mccarthy commented May 17, 2022

Description of your changes:
This PR implements changes to the KFP CLI output.

There are three improvements:

  1. The CLI always outputs something as a confirmation to the developer that their command worked.

  2. The outputs are consistent in the readable (--output=table) mode. They consistently adhere to the docker/kubectl table style for improved readability.

Example (kfp run list -m 3):

ID                                    NAME    CREATED AT                 STATUS     STATE
fa504119-5cf7-4cb0-b6b6-5299cfda6bbf  my_run  2022-05-17T13:19:27+00:00  Succeeded  Available
087ee22f-c508-4bc7-b826-2b0bd3028c39  my_run  2022-05-17T01:32:14+00:00  Succeeded  Available
d27739e9-aa22-4bce-9060-8443d82b8af0  my_run  2022-05-17T01:32:06+00:00  Succeeded  Available
  1. In JSON (--output=json) mode, the CLI merely passes all the JSON it receives from the backend on to stdout, instead of filtering and renaming fields. This makes the output much more complete/usable/consistent (e.g. can be parsed with jq and more fields are available) for CLI users, makes the response payloads from the different KFP API clients more consistent, and decreases ongoing maintenance costs for KFP developers.

Checklist:

@connor-mccarthy connor-mccarthy requested a review from chensun May 17, 2022 13:37
@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@connor-mccarthy
Copy link
Member Author

/test all

@connor-mccarthy connor-mccarthy marked this pull request as ready for review May 18, 2022 17:15
Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks @connor-mccarthy. I think this change worth having a release note entry.

@google-oss-prow google-oss-prow bot removed the lgtm label May 19, 2022
@connor-mccarthy
Copy link
Member Author

connor-mccarthy commented May 19, 2022

/lgtm

Thanks @connor-mccarthy. I think this change worth having a release note entry.

Thanks, @chensun. Done. I also took this opportunity to add two other CLI-related release notes from PRs merged since the last release.

Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks!

@google-oss-prow google-oss-prow bot added the lgtm label May 19, 2022
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit b0db428 into kubeflow:master May 20, 2022
connor-mccarthy added a commit to connor-mccarthy/pipelines that referenced this pull request May 25, 2022
…w#7739)

* fix cli upload pipeline version

* organize requirements.in

* generate requirements.txt

* add pip-tools to requirements-dev

* improve CLI output

* update release notes
abaland pushed a commit to abaland/pipelines that referenced this pull request May 29, 2022
…w#7739)

* fix cli upload pipeline version

* organize requirements.in

* generate requirements.txt

* add pip-tools to requirements-dev

* improve CLI output

* update release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants