You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm always frustrated when I read the code of fission-cli, because cliWrapper (pkg/fission-cli/cliwrapper) increase cognitive load on me. I need to read the driver/cobra/cobra.go to understand cliWrapper abstracts what cobra's capabilities are.
When I try to customize fission-cli, the encapsulation of cliWrapper made it difficult for me to add custom features, such as custom error handling.
Also in ISSUE #1899, I try to add some validate for fission-cli, and I found that the validate for fission-cli is not decoupled with complete(code). Also k8s custom resource(CR) lacks validate. I wish the code of validate is shareable to CLI, CR and API.
Describe the solution you'd like
Is it still necessary to use cliWrapper?
why not remove the cliWrapper, instead of using cobra directly.
Before fission 1.5.0, fission-cli use urfavecli as cli driver.
In fission 1.5.0 PR#1265, it use cliwrapper(pkg/fission-cli/cliwrapper) to wrap the urfavecli, and make clean separation of CLI command and libraries mentioned in ISSUE Reconstruct project structure #1189.
In fission 1.7.0 PR#1385, migrate from urfavecli to cobra, and it still use cliwrapper to wrap the cobra.
I think it's NOT necessary to use cliWrapper after migrating from urfavecli to cobra.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm always frustrated when I read the code of
fission-cli
, becausecliWrapper
(pkg/fission-cli/cliwrapper) increase cognitive load on me. I need to read thedriver/cobra/cobra.go
to understandcliWrapper
abstracts what cobra's capabilities are.When I try to customize
fission-cli
, the encapsulation ofcliWrapper
made it difficult for me to add custom features, such as custom error handling.Also in ISSUE #1899, I try to add some validate for
fission-cli
, and I found that the validate forfission-cli
is not decoupled withcomplete
(code). Also k8s custom resource(CR) lacks validate. I wish the code of validate is shareable to CLI, CR and API.Describe the solution you'd like
Is it still necessary to use
cliWrapper
?why not remove the
cliWrapper
, instead of using cobra directly.We could use cobra like k8s command line client: kubectl (kubectl create command example)
Additional context
I have read some history of PR and Issues.
I think it's NOT necessary to use
cliWrapper
after migrating from urfavecli to cobra.The text was updated successfully, but these errors were encountered: