cli icon indicating copy to clipboard operation
cli copied to clipboard

Fn deploy should be capable to create a function from func.yml only

Open denismakogon opened this issue 6 years ago • 1 comments

Here's the use case. I have function implemented and it has its own func.yml, so i want to create more function with the same image, so i decided to create more folders with func.yml only, the structure looks like:

app/
---- function_1/
--------------- func.go
--------------- func.yml
--------------- Gopkg*
---- function_2/
--------------- func.yml (with the unique route and config)
---- function_3/
--------------- func.yml (with the unique route and config)
---- app.yml

But when trying to build the app, CLI fails with different errors depending on the content of the func.yml, but if doesn't have the runtime CLi fails with:

ERROR: deploy error on /Users/denismakogon/Documents/oracle/go/src/github.com/fnproject/skyhook/event-service-report/func.yml: Cannot build, no language helper found for

So, from the developers point of view there are two problems (appeared couple times in Slack):

  • no way to define more than one path in func.yml
  • why CLI can't create a function just from the func.yml

denismakogon avatar Apr 21 '18 13:04 denismakogon

once we have triggers this is more seamless, since func.yaml can specify a trigger that only makes a new trigger with a certain function (so you can have e.g. trigger A, B, C that use function X). not worth investing time into adding this to current API imo. current thinking:

all that's in func.yaml would be (i.e. no func definition):

trigger:
  name: sayhello
  func: fn/yo:0.0.42

...

trigger:
  name: sup
  func: fn/yo:0.0.42

makes sense? any feedback?

rdallman avatar Apr 23 '18 17:04 rdallman