openfaas / store

Official Function and Template Store for OpenFaaS
MIT License
162 stars 56 forks source link

Submission Request, imgmod function #74

Open psyhomb opened 5 years ago

psyhomb commented 5 years ago

Hi guys, I would like to submit a review request for this Image Manipulation Function with hope it can be added to the OpenFaaS Function Store :slightly_smiling_face:

{
  "title": "Image Manipulation Function",
  "description": "Provide URL and use image manipulation function to download, scale, gray, flip, mirror, invert any online jpeg or png image",
  "image": "psyhomb/imgmod:latest",
  "name": "imgmod",
  "fprocess": "python3 index.py",
  "network": "func_functions",
  "repo_url": "https://github.com/psyhomb/serverless/tree/master/openfaas/imgmod",
  "environment": {
    "input_mode": "url",
    "output_mode": "image"
  },
  "labels": {
    "com.openfaas.ui.ext": "jpg"
  }
}

Thanks

psyhomb commented 5 years ago

Anything new on this? :(

alexellis commented 5 years ago

Hi there, thanks for taking an interest. The usage information would really help here.

Alex

psyhomb commented 5 years ago

Hi, I think everything has been explained in the README.md file.

Thanks

alexellis commented 5 years ago

This needs to run as a non root user and to write to /tmp/ only. Please can you take a look?

psyhomb commented 5 years ago

Hey @alexellis, function is using in memory file object, in other words it doesn't require filesystem access, so I'm not quite sure what do you mean by it has to write to /tmp?

alexellis commented 5 years ago

Ok then please just make sure you use a non root user next.

psyhomb commented 5 years ago

Will do that ASAP, thanks.

psyhomb commented 5 years ago

Ok then please just make sure you use a non root user next.

Done, all processes running inside of container will be executed under non root user.

psyhomb commented 5 years ago

Hey @alexellis is there anything else I have to change?

psyhomb commented 5 years ago

Hey @alexellis what is going on with this submission, is this suppose to take this long, it's been almost a month?

alexellis commented 5 years ago

The OpenFaaS project is run by unpaid volunteers. As the maintainer I receive hundreds of GitHub notifications per week, so it's hard to keep track of all of them.

I'll check your PR again.

The best way to get on my radar is to message in a public channel on Slack or to DM me there.

alexellis commented 5 years ago

After deploying a function from the store, users will have no idea how to invoke your function. It's not your fault, but you could help them by providing a helper message when the user doesn't provide your expected input, or they give a non-JSON input.

What do you think?

alexellis commented 5 years ago

I'm also struggling to understand why the official Python template wasn't used for the function? I'd rather it was based upon something which is being maintained by the project.

Let us know on Slack if you need any technical support with templates or building custom modules.

Alex

-- Join Slack to connect with the community https://docs.openfaas.com

psyhomb commented 5 years ago

After deploying a function from the store, users will have no idea how to invoke your function. It's not your fault, but you could help them by providing a helper message when the user doesn't provide your expected input, or they give a non-JSON input.

What do you think?

What about repo_url link to full documentation?

"repo_url": "https://github.com/psyhomb/serverless/tree/master/openfaas/imgmod",
psyhomb commented 5 years ago

I'm also struggling to understand why the official Python template wasn't used for the function?

Development of imgmod function was started 2 years ago, at that time python3 template didn't even exist, I've also sent you python3 template suggestion on Slack at that time... so that's the reason why :slightly_smiling_face:.

I'd rather it was based upon something which is being maintained by the project.

This function is tested and it's working on OpenFaaS and AWS Lambda platform/service, is there any kind of issue you've detected?