temporalio / temporal

Temporal service
https://docs.temporal.io
MIT License
11.99k stars 846 forks source link

Unsupported search attribute type: KeywordList #6700

Open tlachy opened 3 weeks ago

tlachy commented 3 weeks ago

Expected Behavior

I am starting docker-compose.yml on windows machine, without wsl with testcontainers. Everything starts without errors.

I can run command: "temporal operator search-attribute create --type keyword --name User" and it passes with message: Search attributes have been added

but command: "temporal operator search-attribute create --type KeywordList --name Tenant" does not work and I expect it to work.

Actual Behavior

Command: "temporal operator search-attribute create --type KeywordList --name Tenant" gives error:

"unable to parse search attribute type KeywordList : unsupported search attribute type: KeywordList"

Steps to Reproduce the Problem

  1. clone https://github.com/temporalio/docker-compose
  2. make sure you have to same versions in .env file
  3. docker compose up
  4. run "docker exec ${containerid of temporal} temporal operator search-attribute create --type KeywordList --name Tenant"

Specifications

COMPOSE_PROJECT_NAME=temporal CASSANDRA_VERSION=3.11.9 ELASTICSEARCH_VERSION=7.16.2 MYSQL_VERSION=8 TEMPORAL_VERSION=1.25.1 TEMPORAL_ADMINTOOLS_VERSION=1.25.1-tctl-1.18.1-cli-1.1.0 TEMPORAL_UI_VERSION=2.26.2 POSTGRESQL_VERSION=13 POSTGRES_PASSWORD=temporal POSTGRES_USER=temporal POSTGRES_DEFAULT_PORT=5432 OPENSEARCH_VERSION=2.5.0

tlachy commented 2 weeks ago

I have found the issue: I had white space after the keywordList like this "KeywordList ":

containerState.execInContainer("temporal", "operator", "search-attribute", "create", "--type", "KeywordList ", "--name", "Assets");

I would create a PR where this would be trimmed, but I cannot find the piece of code which actually process this.

bergundy commented 2 weeks ago

Thanks for the report, we will add quotes around the search attribute type in the error message so that the error is clearer.