Skip to content

Conversation

DanielleMaywood
Copy link
Contributor

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.

@DanielleMaywood DanielleMaywood force-pushed the danielle/tasks/reorder-create-cli-args branch from 86adf7a to 0fe358d Compare September 1, 2025 12:46
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.
@DanielleMaywood DanielleMaywood force-pushed the danielle/tasks/reorder-create-cli-args branch from 0fe358d to 3071ef8 Compare September 1, 2025 13:11
@DanielleMaywood DanielleMaywood marked this pull request as ready for review September 1, 2025 13:22
Copy link
Member

@mafredri mafredri left a 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.

Copy link
Member

@matifali matifali left a 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,
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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

@mafredri
Copy link
Member

mafredri commented Sep 1, 2025

Should we mark this as breaking change?

No need, this is exactly why we placed these under exp. No announcement for release yet either.

Copy link
Member

@johnstcn johnstcn left a 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! 👍

@matifali
Copy link
Member

matifali commented Sep 1, 2025

Should we mark this as breaking change?

No need, this is exactly why we placed these under exp. No announcement for release yet either.

But many of our customers are using Tasks. So I was just being extra cautious not to break their workflows without any information. exp gives us the freedom to break, but we should still announce this commit as a breaking change in the changelog.

@mafredri
Copy link
Member

mafredri commented Sep 1, 2025

But many of our customers are using Tasks. So I was just being extra cautious not to break their workflows without any information. exp gives us the freedom to break, but we should still announce this commit as a breaking change in the changelog.

I don't have a strong opinion. We don't document exp commands and we haven't advertised the tasks CLI commands in the release. But if you feel it should be called out then let's do it. 👍🏻 (@DanielleMaywood, did create slip into the release?)

@johnstcn
Copy link
Member

johnstcn commented Sep 1, 2025

But many of our customers are using Tasks. So I was just being extra cautious not to break their workflows without any information. exp gives us the freedom to break, but we should still announce this commit as a breaking change in the changelog.

We can if you feel it's necessary. Just bear in mind the output of coder exp --help states:

Internal commands for testing and experimentation. These are prone to breaking changes with no notice.

@DanielleMaywood
Copy link
Contributor Author

(@DanielleMaywood, did create slip into the release?)

It was merged on Friday so I don't think so

@mafredri
Copy link
Member

mafredri commented Sep 1, 2025

It was merged on Friday so I don't think so

Thanks, then I don't see any reason to tag this breaking. 👍🏻

@matifali
Copy link
Member

matifali commented Sep 1, 2025

All good then Thanks all.

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Nice work!

@DanielleMaywood DanielleMaywood merged commit a2a758d into main Sep 2, 2025
31 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/tasks/reorder-create-cli-args branch September 2, 2025 08:07
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants