upsertSearchAttributes doesn't work properly for new attributes added
Environment:
cadence-client: 2.6.3 Cadence tag: 0.10.2 After added custom attributes properly, with success response we observe that this element is included into development_es.yaml. frontend.validSearchAttributes: value: BinaryChecksums: 1 CadenceChangeVersion: 1 CloseStatus: 2 CloseTime: 2 CustomBoolField: 3 CustomDatetimeField: 5 CustomDomain: 1 CustomDoubleField: 4 CustomIntField: 2 CustomKeywordField: 1 CustomStringField: 0 DomainID: 1 ExecutionTime: 2 HistoryLength: 2 Operator: 1 RolloutID: 1 RunID: 1 StartTime: 2 WorkflowID: 1 WorkflowType: 1 addon: 1 addon-type: 1 phoneNumber: 0 environment: 1 project: 1 service: 1 user: 1 constraints: {} But when use the upsertSearchAttributes method with this new attribute the server returns an error:
Map<String, Object> attributes = new HashMap<>();
attributes.put("phoneNumber", "911234567");
Workflow.upsertSearchAttributes(attributes);
BAD_SEARCH_ATTRIBUTES - "BadRequestError{Message: phoneNumber is not valid search attribute}" Note: doing the same test with other attribute, for example CustomKeywordField the method works properly.