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

Update faas-cli new to use stack.yaml as a default #1005

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

alexellis
Copy link
Member

@alexellis alexellis commented Jan 27, 2025

Description

Update faas-cli new to use stack.yaml as a default

Updates faas-cli new to create a stack.yaml file instead of a YAML file named after the function. This is to help users discover that stack.yaml does not require a --yaml or -f flag which can become cumbersome.

When a stack.yaml or the file specified via -f already exists the new command will now prompt users to use --append

Additional changes:

  • The signing option for faas-cli invoke changes to the more modern SHA256, I don't believe this is actually used by anyone so didn't retain the SHA1 option
  • go.mod and vendor updated for third-party dependencies

Motivation and Context

Requested a number of times over the years, I also find it more convenient to work from a file where a separate -f parameter isn't needed for each command

How Has This Been Tested?

Various manual tests and the unit tests needed updates since there were test tables which wrote out different names which started to conflict with the new behaviour described.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Certain blog posts may need an update if there are any commands such as mv fn.yml stack.yml, which could be tricky to find. Perhaps a regex in the docs and the website would be a good starting point.

Updates faas-cli new to create a stack.yaml file instead of
a YAML file named after the function. This is to help users
discover that stack.yaml does not require a --yaml or -f
flag which can become cumbersome.

When a stack.yaml or the file specified via -f already exists
the new command will now prompt users to use --append

Convert to SHA256 signatures for the invoke command

This is a convenience option for invoking functions along with
a signature, if a function accepts one. They should all have been
moved to sha256 now if they were even using it

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
@alexellis alexellis force-pushed the new_defaults_to_stack_yaml branch from 8f52b97 to 6b02a9e Compare January 27, 2025 15:04
@alexellis alexellis merged commit 1ca7ded into master Jan 27, 2025
2 checks passed
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 this pull request may close these issues.

1 participant