-
Notifications
You must be signed in to change notification settings - Fork 988
chore(cli): re-order CLI create command #19658
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
Conversation
86adf7a
to
0fe358d
Compare
Relates to coder/internal#893 Instead of `coder task create <template> --input <input>`, it is now `coder task create <input> --template <template>`. If there is only one AI task template on the deployment, the `--template` parameter can be omitted.
0fe358d
to
3071ef8
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.
I think this new approach will ultimately be better, thanks for implementing! Some feedback inline.
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.
Thanks <3. 🚢
Should we mark this as breaking change?
Flag: "input", | ||
Env: "CODER_TASK_INPUT", | ||
Value: serpent.StringOf(&taskInput), | ||
Required: true, |
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.
Does it mean we can start a task without an input? i.e., an empty prompt? Should we allow that?
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.
I think this may end up happening in a prebuild scenario?
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.
Maybe, yes. Prebuilds are tricky.
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.
I don't think we should start tasks without input necessarily, but who's to say there isn't a default input that's only controlled by e.g. template parameters. This was one motivation that --input
was made a flag previously.
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.
Have added a check to disallow empty task input
No need, this is exactly why we placed these under |
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.
Nothing to add beyond what @mafredri already mentioned. Nice work! 👍
But many of our customers are using Tasks. So I was just being extra cautious not to break their workflows without any information. |
I don't have a strong opinion. We don't document |
We can if you feel it's necessary. Just bear in mind the output of
|
It was merged on Friday so I don't think so |
Thanks, then I don't see any reason to tag this breaking. 👍🏻 |
All good then Thanks all. |
In the scenario where both a template name and a template version were provided, we'd hit the database twice, depsite only needing to do it once.
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.
Nice work!
Relates to coder/internal#893
Instead of
coder task create <template> --input <input>
, it is nowcoder task create <input> --template <template>
.If there is only one AI task template on the deployment, the
--template
parameter can be omitted.