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

Start scheduler fails with arguments "-s PushStaged" #207

Closed
r4ntix opened this issue Sep 14, 2022 · 3 comments · Fixed by #216
Closed

Start scheduler fails with arguments "-s PushStaged" #207

r4ntix opened this issue Sep 14, 2022 · 3 comments · Fixed by #216
Labels
bug Something isn't working

Comments

@r4ntix
Copy link
Contributor

r4ntix commented Sep 14, 2022

Describe the bug
According to the prompt of the command line, I tried to start the service with the -s parameter:

./target/debug/ballista-scheduler --help
Usage: ./target/debug/ballista-scheduler [ARGUMENTS...]

Arguments:
        -s, --scheduler-policy    The scheduing policy for the scheduler, see
                                  TaskSchedulingPolicy::variants() for options.
                                  Default: PushStaged

the result was an error:

./target/debug/ballista-scheduler -s PushStaged
Error: Failed to parse argument '--scheduler-policy': Invalid variant: PushStaged.

Hint: the value must be The scheduler policy for the scheduler.

Describe the solution you'd like
In this code:

// an enum used to configure the scheduler policy
// needs to be visible to code generated by configure_me
#[derive(Clone, ArgEnum, Copy, Debug, serde::Deserialize)]
pub enum TaskSchedulingPolicy {
    PullStaged,
    PushStaged,
}

clap ArgEnum derive macro generate possible values pull-staged, push-staged, not PullStaged, PushStaged

There are two solutions:

  1. Modify the help doc to make it clear that the -s parameter values are pull-staged, push-staged.
  2. Modify the TaskSchedulingPolicy enum and add #[clap(rename_all = "camel")], it generate possible values pullStaged, pushStaged

I can submit a PR for this, but need some suggestions.

@r4ntix r4ntix added the bug Something isn't working label Sep 14, 2022
@avantgardnerio
Copy link
Contributor

I'm for solution # 1. There is a multi-decade tradition of this being "the unix way".

@r4ntix
Copy link
Contributor Author

r4ntix commented Sep 15, 2022

@avantgardnerio I have submitted a PR for this :)

@yahoNanJing
Copy link
Contributor

yahoNanJing commented Sep 15, 2022

Thanks @r4ntix for the refinement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants