Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Require invoker name for 'riff create' and 'riff init' and clarify usage in help #502

Closed
jldec opened this issue Apr 1, 2018 · 3 comments · Fixed by #526
Closed

Require invoker name for 'riff create' and 'riff init' and clarify usage in help #502

jldec opened this issue Apr 1, 2018 · 3 comments · Fixed by #526
Assignees

Comments

@jldec
Copy link
Contributor

jldec commented Apr 1, 2018

The CLI UX would be simpler if an invoker parameter were required for all riff create <invoker> and riff init <invoker> commands. If no invoker is specified, display a usage error and the list of registered invokers.

this is a followup to #448

  1. Auto-detecting invokers from file extensions introduces non-determinism. E.g. adding new invokers could break old workflows by stealing the extension. This is true even when pointing to a source file with --artifact.

  2. The current command-invoker already makes it necessary always to disambiguate, because it matches *.

  3. It's often eaiser to specify an invoker than point to an "artifact" file (invoker names are short).

  4. with this approach we could even auto-generate the source file when there are no files at all in the directory. E.g. riff create node --stream

@ericbottard
Copy link
Contributor

If we go through with this, this is a matter of completely removing the riff create and riff init commands and have only the (currently) sub-commands.

This would simplify the codebase for sure.

I am in favor of it, as I agree users know they want to create a "java" function for example, when they have a .jar file at hand

@scothis scothis assigned ericbottard and unassigned scothis Apr 5, 2018
@jldec
Copy link
Contributor Author

jldec commented Apr 5, 2018

see also #517

@scothis
Copy link
Member

scothis commented Apr 6, 2018

#518 only addressed the doc part of this issue

@scothis scothis reopened this Apr 6, 2018
scothis added a commit to scothis/riff that referenced this issue Apr 6, 2018
riff will no longer attempt to resolve an invoker based on the files in
the current directory. The previous resolution could change behavior as`
new invokers are installed in the cluster or files change on disk.

Fixes projectriff#502
scothis added a commit that referenced this issue Apr 6, 2018
riff will no longer attempt to resolve an invoker based on the files in
the current directory. The previous resolution could change behavior as`
new invokers are installed in the cluster or files change on disk.

Fixes #502
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants