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

Pass --cmdline to func_runner and parse CL args #692

Merged
merged 2 commits into from
Nov 2, 2022
Merged

Conversation

csegarragonz
Copy link
Collaborator

@csegarragonz csegarragonz commented Oct 31, 2022

In this PR I modify the func_runner to optionally take a string to set as command line for the running function. I also take the oportunity to make the argc/argv parsing in func_runner more modular.

In summary, we can now do the following:

# Will print "hello echo"
inv run demo echo --data "hello echo"

# Will print 'hello' and 'world' as arguments
inv run demo argc_argv --cmdline "hello world"

As I am writing this examples, I'm thinking it would be a good idea to have integration tests for the FaasmCLI... 🤔

@csegarragonz csegarragonz self-assigned this Oct 31, 2022
@csegarragonz csegarragonz marked this pull request as ready for review November 1, 2022 14:19
Copy link
Collaborator

@Shillaker Shillaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, good to add something more structured for this.

Re. integration tests for Faasm CLI, I think we indirectly test it in the quick-start tests, but not sure if we do it elsewhere. Could be nice if it was a simple extra GHA step.

@csegarragonz csegarragonz merged commit 15c3580 into main Nov 2, 2022
@csegarragonz csegarragonz deleted the func-runner-args branch November 2, 2022 10:14
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.

None yet

2 participants