openfaas / openfaas/faas-cli

Design review: custom files for handlers

Open
#321 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design/review enhancement proposal
Dominant language
Go
Stars
816
Forks
230
Avg merge
6h 4m
Merged PRs (30d)
1

Description

What would it take for us to be able to support a different project file name for a C# template for instance?

Frank P @fpommerening from Germany reported that two templates in a Visual Studio project you end up with Function.csproj twice in the UI and that this is confusing - even more so when you have 4-5 functions.

Solution:
  + Function
      - Handler.cs
  + Function
      - Handler.cs

What do we think?

How could we allow a custom project name without breaking the simplicity of our templating system in the faas-cli?

This would also apply for things like an interpreted language where there is no project file - just a raw handler. If you're editing 10x Node functions in Atom for instance you'll see:

fn1/handler.js
fn2/handler.js
fn3/handler.js

Lastly - this is just to promote discussion and look at the options. I want us to look at it since we've had user feedback, but it doesn't mean that the CLI is broken or that it's not possible to be productive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reviewing the faas-cli templating system and how C# and Node handlers are represented, then compare options for custom project or handler names without breaking current templates. Done means an agreed, concrete design and scope, since this issue is explicitly a discussion rather than a reported CLI defect.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, go, nodejs
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.