Skip to content

Conversation

@alexshtin
Copy link
Contributor

@alexshtin alexshtin commented Feb 22, 2021

What changed?
Fix tctl start workflow command with empty search attributes.

Why?
W/o fix, start command treats empty search attributes list as list with one empty item, which is wrong and doesn't pass server validation.

How did you test it?
Run different combinations manually.

Potential risks
No risks.

Is hotfix candidate?
No.

@alexshtin alexshtin requested a review from a team February 22, 2021 19:26
func processSearchAttr(c *cli.Context) *commonpb.SearchAttributes {
rawSearchAttrKey := c.String(FlagSearchAttributesKey)
searchAttrKeys := trimSpace(strings.Split(rawSearchAttrKey, searchAttrInputSeparator))
sanitize := func(val string) []string {
Copy link
Contributor

Choose a reason for hiding this comment

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

could be worth switching to multiple inputs in future, similar to here #600

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point but not now.

@alexshtin alexshtin merged commit 7a5b860 into temporalio:master Feb 22, 2021
@alexshtin alexshtin deleted the feature/fix-tctl-empty-sa branch February 22, 2021 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants