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

chore(sdk): use click for kfp components commands #7559

Merged

Conversation

connor-mccarthy
Copy link
Member

@connor-mccarthy connor-mccarthy commented Apr 13, 2022

Description of your changes:
Uses click instead of typer for the kfp components commands.

Checklist:

@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
Copy link
Member Author

connor-mccarthy commented Apr 13, 2022

/hold - Merge after #7558.

@connor-mccarthy
Copy link
Member Author

/hold -- Merge after #7558.

@connor-mccarthy
Copy link
Member Author

/retest

@connor-mccarthy
Copy link
Member Author

/test all

@connor-mccarthy
Copy link
Member Author

/retest


import click
from kfp.cli import (cli, components, diagnose_me_cli, experiment, pipeline,
recurring_run, run)
Copy link
Member

Choose a reason for hiding this comment

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

nit: break this up into multi-lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, done in #7558.

@@ -58,25 +46,11 @@ def cli(ctx: click.Context, endpoint: str, iap_client_id: str, namespace: str,
Feature stage:
[Alpha](https://github.com/kubeflow/pipelines/blob/07328e5094ac2981d3059314cc848fbb71437a76/docs/release/feature-stages.md#alpha)
"""
if ctx.invoked_subcommand in _NO_CLIENT_COMMANDS:
NO_CLIENT_COMMANDS = ['diagnose_me', 'components']
Copy link
Member

Choose a reason for hiding this comment

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

nit: (optional) missing components from this list was causing a bug in the past, we may consider adding a UT to ensure we don't miss updating this list when applicable--like a new command being added which should be in this list.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a good idea. I will do this in a separate PR after merging #7569. Some of the changes in #7569 will help support this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I will do this as a separate PR, after #7569 is merged. #7569 has some changes that will help support this.

@@ -89,7 +89,6 @@ def create(ctx: click.Context,
end_time: Optional[str] = None,
interval_second: Optional[int] = None,
max_concurrency: Optional[int] = None,
params: Optional[dict] = None,
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this was never used, but args is? I wonder if we're consistent on using params vs. args.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's right.

Are you referring to consistency between the CLI argument names and the Client parameter names? If so, we definitely aren't consistent everywhere. As a final step in the V2 CLI migration, I'm going to see what can be done to remedy this in a backward compatible way.

@chensun chensun mentioned this pull request Apr 19, 2022
1 task
@connor-mccarthy connor-mccarthy force-pushed the remove-typer-from-cli branch 2 times, most recently from 2b193aa to 093d3d6 Compare April 19, 2022 21:53
@connor-mccarthy
Copy link
Member Author

/retest

1 similar comment
@connor-mccarthy
Copy link
Member Author

/retest

@connor-mccarthy connor-mccarthy force-pushed the remove-typer-from-cli branch 2 times, most recently from 25d1f60 to 286cb1d Compare April 20, 2022 17:00
@google-oss-prow google-oss-prow bot added size/L and removed size/XL labels Apr 20, 2022
@connor-mccarthy connor-mccarthy force-pushed the remove-typer-from-cli branch 2 times, most recently from 5edca7b to a9ba136 Compare April 20, 2022 17:04
@google-oss-prow
Copy link

@connor-mccarthy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-samples-v2 48a2aad link true /test kubeflow-pipelines-samples-v2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@chensun
Copy link
Member

chensun commented Apr 20, 2022

/lgtm
/approve

Thanks!

@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

@connor-mccarthy connor-mccarthy merged commit 2db431b into kubeflow:master Apr 20, 2022
abaland pushed a commit to abaland/pipelines that referenced this pull request May 29, 2022
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