Add option to provide file with arguments to start/deploy sequence #971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Why?
All parameters user can provide in command line can be supplied with config file.
Usage:
seq-startup-config.json:
{ "outputTopic": "test-topic", "args": ["arg1", "arg2"], "limits": { "memory": 64 }, "appConfig": { "a": 1 } }Test with
args-config-testSequencehttps://github.com/scramjetorg/reference-apps/blob/main/js/args-config-test/index.ts
si seq deploy packages/args-config-test.tar.gz --startup-config seq-startup-config.json Request ok: http://127.0.0.1:8000/api/v1/sequence status: 200 OK {"_id":"0e55aae1-25a5-4f0d-82ac-1b7192a4c788","host":{"apiBase":"http://127.0.0.1:8000/api/v1"},"sequenceURL":"sequence/0e55aae1-25a5-4f0d-82ac-1b7192a4c788"} Request ok: http://127.0.0.1:8000/api/v1/sequence/0e55aae1-25a5-4f0d-82ac-1b7192a4c788/start status: 200 OK {"host":{"apiBase":"http://127.0.0.1:8000/api/v1"},"_id":"db06246c-996b-49f7-9f0a-be79c01413f2","instanceURL":"instance/db06246c-996b-49f7-9f0a-be79c01413f2"} Done in 5.92s.$ si topic get test-topic Request ok: http://127.0.0.1:8000/api/v1/topic/test-topic status: 200 OK config: {"a":1} string, "arg1" string, "arg2"params from file can be overwritten with cli params, ie:
si seq deploy packages/args-config-test.tar.gz --startup-config seq-startup-config.json --output-topic other-topic Request ok: http://127.0.0.1:8000/api/v1/sequence status: 200 OK {"_id":"8c72da12-a69c-4fbc-aeb1-2d7fad84e140","host":{"apiBase":"http://127.0.0.1:8000/api/v1"},"sequenceURL":"sequence/8c72da12-a69c-4fbc-aeb1-2d7fad84e140"} Request ok: http://127.0.0.1:8000/api/v1/sequence/8c72da12-a69c-4fbc-aeb1-2d7fad84e140/start status: 200 OK {"host":{"apiBase":"http://127.0.0.1:8000/api/v1"},"_id":"e4c4ea28-0ab8-4760-a22e-d2d98fc7c4d4","instanceURL":"instance/e4c4ea28-0ab8-4760-a22e-d2d98fc7c4d4"} Done in 6.04s.$ si topic get other-topic Request ok: http://127.0.0.1:8000/api/v1/topic/other-topic status: 200 OK config: {"a":1} string, "arg1" string, "arg2"Review checks:
These aspects need to be checked by the reviewer: