Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add watch mode to faas-cli up workflow #952

Closed
LucasRoesler opened this issue Feb 8, 2023 · 3 comments · Fixed by #962
Closed

feature: add watch mode to faas-cli up workflow #952

LucasRoesler opened this issue Feb 8, 2023 · 3 comments · Fixed by #962
Assignees

Comments

@LucasRoesler
Copy link
Member

Expected Behaviour

We want to add a flag to the faas-cli up command so that it can run continuously and re-build and deploy when files are changed.

For example faas-cli up --watch will build and deploy the functions in the stack.yaml and then continue watching for file change notifications and rebuild and deploy the stack when an event is seen.

Current Behaviour

faas-cli up is a one-off workflow right now.

Why do you need this?

Make the dev-loop shorter.

Context

This was discussed in the community call as a feature that we would like to have and it would be a test ground for also adding the watch behavior to the faas-cli local-run

@LucasRoesler LucasRoesler self-assigned this Feb 8, 2023
@LucasRoesler
Copy link
Member Author

For the file notifications, skaffold is using the fsnotify package and it looks like a solid package.

@alexellis
Copy link
Member

alexellis commented Feb 8, 2023

Here's the equivalent command with Google Skaffold which is well known for giving an "auto-build" workflow:

GoogleContainerTools/skaffold#8396

Example function / config for Skaffold with faas-cli: https://github.com/alexellis/openfaas-skaffold-faas-cli

After we have a working prototype for faas-cli up, local-run would probably be a good place to go next.

See also as related: #953

@alexellis
Copy link
Member

An example with a library that doesn't need CGO and it's used by Skaffold:

https://github.com/alexellis/fstail/

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

Successfully merging a pull request may close this issue.

2 participants