-
Notifications
You must be signed in to change notification settings - Fork 405
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
Provide cli command to spawn a distributed worker #734
Provide cli command to spawn a distributed worker #734
Conversation
7b2a147
to
bb149ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments in the review. Nothing major, overall LGTM 👍
|
||
let sutList = Object.keys(bindOptions.sut); | ||
if (!sut) { | ||
let msg = `SUT name is not specified. Available SUTs: ${sutList.join(' | ')}`; | ||
let msg = `SUT name is not specified. Available SUTs: ${Object.keys(defaultBindOpts.sut).join(' | ')}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we list the SUT names available in the set config file (not necessarily the default)?
So ${Object.keys(bindOptions.sut).join(' | ')}
or simply ${sutList.join(' | ')}
Same for the other error messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an attempt to try and protect us from someone passing in an incorrect file - if it is completely wrong, then we won't be able to list anything.
Which raises the question on the need for a validator here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a validator is definitely needed. Then let's leave it as it is for now.
}); | ||
yargs.usage('Usage:\n caliper bind --caliper-bind-sut fabric --caliper-bind-sdk 1.4.1 --caliper-bind-cwd ./ --caliper-bind-args="-g"'); | ||
|
||
// enforce the option after these options | ||
yargs.requiresArg(['caliper-bind-sut','caliper-bind-sdk','caliper-bind-args', 'caliper-bind-cwd']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the requiresArg
call has been removed from our run
command, so the options can also be specified from other sources (env, config file, etc). Strange how this line didn't cause a problem so far....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above are the required items as per the bind configuration only - which iirc also complains if the items are not passed. But you are correct - this is essentially a run command, so we should map to that pattern and only throw/reject if there are no values at the point of use
9dfbec4
to
69572d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the minor strict
duplicate in the CLI, then good to go 👍
…cess comms method Signed-off-by: [email protected] <[email protected]>
69572d4
to
6625b71
Compare
CLI command to spawn a worker that uses a non-process comms method
Changes include:
closes #697
Signed-off-by: [email protected] [email protected]