Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Some improvements #12

Open
horike37 opened this issue Apr 9, 2018 · 2 comments
Open

Some improvements #12

horike37 opened this issue Apr 9, 2018 · 2 comments

Comments

@horike37
Copy link

horike37 commented Apr 9, 2018

I have been playing this integration for a while, and then I have found some points to be improved.
I have written those here 馃槃
How does it sound to you?

All commands work with spawn method

Right now, all commands in this integration execute external commands like faas-cli and docker with child_process package. imo, this implementation might introduce instability to this plugin since the behavior depends on library versions which a user Individually installs.

library versions should be managed by package manager of nodejs, so would be good to use sdk, or if there aren't sdk, request API provided by OpenFaaS cluster instead of commands.

sls init command would be unnecessity

The framework is just for function deployment tool, however, this command is for setting up OpenFaaS cluster, so would be unnecessity in this integration.
This one should contain some stuff for functions like package, deploy, invoke, logs and remove functions

Need unit testing

Would be good to add unit testing to maintain it for a long time.

@alexellis
Copy link
Member

this implementation might introduce instability to this plugin since the behavior depends on library versions which a user Individually installs.

I'd like an example of this if you have one.

sis init

Yes I agree sls init is not needed - I've deleted it

Additional tests

+1 for this if you'd like to make recommendations on how to start doing that and how far to go with it.

With regard to the spawning of processes - we'd need a small SDK to abstract this away so it could be swapped for a test double at runtime.

@Templum
Copy link

Templum commented May 11, 2018

We might add an afterInstall script which goes and fetches (based on the platform) an fixed version of the faas-cli. The docker part should be pretty stable

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

No branches or pull requests

3 participants