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

Cli Usability: Cleanup fn commands and make dir optional #1710

Merged

Conversation

phanimarupaka
Copy link
Contributor

This Pr does the following

  1. Make DIR field optional for all fn commands.
  2. kpt fn source accepts input only from a directory and not stdin
  3. kpt fn eval accepts stdin iff - is specified making it consistent with kubectl and other commands
  4. kpt fn sink only writes to output Dir and not to stdout.

Example of out of place hydration

kpt fn source | kpt fn eval - --image gcr.io/kpt-fn/apply-setters -- environment=dev | kpt fn sink dev/

In-place hydration

kpt fn eval --image gcr.io/kpt-fn/apply-setters -- environment=dev

@phanimarupaka phanimarupaka requested a review from droot April 7, 2021 22:28
@phanimarupaka phanimarupaka changed the title Make Dir Optional For Fn Commands and cleanup Cli Usability: Cleanup fn commands and make dir optional Apr 7, 2021
@phanimarupaka phanimarupaka self-assigned this Apr 7, 2021
@phanimarupaka phanimarupaka added area/hydrate cleanup p1 size/M 2 day triaged Issue has been triaged by adding an `area/` label ux impact labels Apr 7, 2021
@phanimarupaka phanimarupaka added this to the v1.0 m1 milestone Apr 7, 2021
@phanimarupaka phanimarupaka mentioned this pull request Apr 7, 2021
7 tasks
thirdparty/cmdconfig/commands/cmdeval/cmdeval.go Outdated Show resolved Hide resolved
@phanimarupaka phanimarupaka force-pushed the MakeDirOptionalForFnCommands branch 2 times, most recently from d662992 to f3bb0e2 Compare April 8, 2021 16:54
@frankfarzan
Copy link
Contributor

@Shell32-Natsu @droot We don't have sufficient e2e test coverage for piping behavior source | eval | sink today, which needs to be added soon to make sure there's no regression here.

@phanimarupaka
Copy link
Contributor Author

This PR is waiting on #1711 to be merged.

@phanimarupaka phanimarupaka merged commit dc18805 into kptdev:next Apr 8, 2021
frankfarzan pushed a commit to frankfarzan/kpt that referenced this pull request Jun 3, 2021
* Make Dir Optional For Fn Commands

* Clean -<STDIN> to -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hydrate cleanup p1 size/M 2 day triaged Issue has been triaged by adding an `area/` label ux impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants