Skip to content
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

Can't create search attributes in v1.23.0 #5669

Closed
nunofgs opened this issue Apr 5, 2024 · 1 comment
Closed

Can't create search attributes in v1.23.0 #5669

nunofgs opened this issue Apr 5, 2024 · 1 comment

Comments

@nunofgs
Copy link

nunofgs commented Apr 5, 2024

First of all, thank you for Temporal ❤️

Expected Behavior

I should be able to create search attributes with temporal operator search-attribute create --name FoobarId --type Int.

Actual Behavior

It says it succeeds but then if you list attributes it's not there.

This works in v1.22.4, but doesn't in v1.23.0

Also, in v1.23.0 if you try adding the same search attribute twice you get an error that mentions it's already there, but in v1.23.0 you always get Search attributes have been added, which further indicates there's a possible breaking change.

Steps to Reproduce the Problem

Here's a small repro docker-compose:

version: "3"

services:
  mysql:
    image: mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes

  temporal:
    image: temporalio/auto-setup:1.23.0
    environment:
      - DB=mysql
      - DB_PORT=3306
      - MYSQL_USER=root
      - MYSQL_SEEDS=mysql
  1. docker-compose up -d
  2. docker-compose exec temporal bash
  3. temporal operator search-attribute create --name FoobarId --type Int
  4. temporal operator search-attribute list

Results:

❯ docker-compose up -d
[+] Running 11/11
 ✔ mysql 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                         11.3s
   ✔ ea4e27ae0b4c Pull complete                                                 1.9s
   ✔ 519fbc71d3a7 Pull complete                                                 0.5s
   ✔ 3543c786ec0e Pull complete                                                 0.6s
   ✔ 5cbcd7fa1c4c Pull complete                                                 1.7s
   ✔ a9b531b9c23d Pull complete                                                 1.2s
   ✔ 606e5727259a Pull complete                                                 2.1s
   ✔ f05ab3dbe893 Pull complete                                                 4.6s
   ✔ 03d0dad6b159 Pull complete                                                 2.3s
   ✔ f0b98fb7a666 Pull complete                                                 5.6s
   ✔ f26e0edca2bb Pull complete                                                 2.9s
[+] Building 0.0s (0/0)                                              docker:orbstack
[+] Running 3/3
 ✔ Network temporal-repro_default       Cre...                                  0.0s
 ✔ Container temporal-repro-mysql-1     S...                                    0.4s
 ✔ Container temporal-repro-temporal-1  Started                                 0.4s

❯ docker-compose exec temporal bash
249d641a2523:/etc/temporal$ TEMPORAL_ADDRESS=temporal:7233 temporal operator search-attribute create --name FoobarId --type Int
Search attributes have been added
249d641a2523:/etc/temporal$ TEMPORAL_ADDRESS=temporal:7233 temporal operator search-attribute list
             Name                Type
  BatcherNamespace            Keyword
  BatcherUser                 Keyword
  BinaryChecksums             KeywordList
  BuildIds                    KeywordList
  CloseTime                   Datetime
  ExecutionDuration           Int
  ExecutionStatus             Keyword
  ExecutionTime               Datetime
  HistoryLength               Int
  HistorySizeBytes            Int
  ParentRunId                 Keyword
  ParentWorkflowId            Keyword
  RunId                       Keyword
  StartTime                   Datetime
  StateTransitionCount        Int
  TaskQueue                   Keyword
  TemporalChangeVersion       KeywordList
  TemporalNamespaceDivision   Keyword
  TemporalSchedulePaused      Bool
  TemporalScheduledById       Keyword
  TemporalScheduledStartTime  Datetime
  WorkflowId                  Keyword
  WorkflowType                Keyword
249d641a2523:/etc/temporal$

Specifications

  • Version: 1.23.0
  • Platform: Mac + Docker
@nunofgs
Copy link
Author

nunofgs commented May 22, 2024

Turns out this was because I was using mysql 5.7 as the database. It works with mysql 8.

@nunofgs nunofgs closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant