cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug] Decide on --name vs --type and use consistently.

Open dandavison opened this issue 1 year ago • 3 comments
trafficstars

From https://github.com/temporalio/cli/pull/455#discussion_r1501713227

In our current (0.x) temporal CLI, signal and update use --name whereas query uses --type. However, IMO we need the flag name to be the same for signal, query, and update, so a compatibility break with 0.x is inevitable.

dandavison avatar Feb 24 '24 23:02 dandavison

Current CLI matches the gRPC API terminology.

Docs uses name for both Query and Signal, nothing for Update yet.

Inclined toward using name for all 3 in docs & CLI.

lorensr avatar Feb 25 '24 02:02 lorensr

Inclined toward using name for all 3 in docs & CLI.

Same and we've done this for newer SDKs. We would have to decide this now pre-1.0. Query is pretty commonly used so this would be our biggest compatibility break to date I believe, but at least (with --type removed) it'd be an immediately CLI flag validation failure. Alternatively we could deprecate --type in favor of --name, but we'd have to admit to ourselves then we'd never remove it if we're not willing to remove it pre-1.0.

cretz avatar Feb 26 '24 14:02 cretz

We could make them aliases for each other potentially.

Personally I think type is slightly more accurate, but, honestly either works.

Sushisource avatar Feb 26 '24 17:02 Sushisource