Skip to content

Commit dc3c78f

Browse files
authored
Align dynamic config with proto enum (#417)
1 parent 9f73a26 commit dc3c78f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

common/definition/indexedKeys.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const (
4747
CustomStringField = "CustomStringField"
4848
CustomKeywordField = "CustomKeywordField"
4949
CustomIntField = "CustomIntField"
50-
CustomBoolField = "CustomBoolField"
5150
CustomDoubleField = "CustomDoubleField"
51+
CustomBoolField = "CustomBoolField"
5252
CustomDatetimeField = "CustomDatetimeField"
5353
TemporalChangeVersion = "TemporalChangeVersion"
5454
)
@@ -69,8 +69,8 @@ func createDefaultIndexedKeys() map[string]interface{} {
6969
CustomStringField: commonpb.IndexedValueType_String,
7070
CustomKeywordField: commonpb.IndexedValueType_Keyword,
7171
CustomIntField: commonpb.IndexedValueType_Int,
72-
CustomBoolField: commonpb.IndexedValueType_Bool,
7372
CustomDoubleField: commonpb.IndexedValueType_Double,
73+
CustomBoolField: commonpb.IndexedValueType_Bool,
7474
CustomDatetimeField: commonpb.IndexedValueType_Datetime,
7575
TemporalChangeVersion: commonpb.IndexedValueType_Keyword,
7676
BinaryChecksums: commonpb.IndexedValueType_Keyword,

common/elasticsearch/validator/searchAttrValidator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (sv *SearchAttributesValidator) ValidateSearchAttributes(input *commonpb.Se
9898

9999
sv.logger.WithTags(tag.ESKey(key), tag.Value(invalidValue), tag.WorkflowNamespace(namespace)).
100100
Error("invalid search attribute value")
101-
return serviceerror.NewInvalidArgument(fmt.Sprintf("%s is not a valid search attribute value for key %s", invalidValue, key))
101+
return serviceerror.NewInvalidArgument(fmt.Sprintf("%v is not a valid search attribute value for key %s", invalidValue, key))
102102
}
103103
// verify: key is not system reserved
104104
if definition.IsSystemIndexedKey(key) {

config/dynamicconfig/development_es.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ frontend.validSearchAttributes:
1919
CustomStringField: 0
2020
CustomKeywordField: 1
2121
CustomIntField: 2
22-
CustomBoolField: 3
23-
CustomDoubleField: 4
22+
CustomDoubleField: 3
23+
CustomBoolField: 4
2424
CustomDatetimeField: 5
2525
project: 1
2626
service: 1

host/testdata/es_index_template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"CustomStringField": { "type": "text" },
5050
"CustomKeywordField": { "type": "keyword"},
5151
"CustomIntField": { "type": "long"},
52-
"CustomBoolField": { "type": "boolean"},
5352
"CustomDoubleField": { "type": "double"},
53+
"CustomBoolField": { "type": "boolean"},
5454
"CustomDatetimeField": { "type": "date"},
5555
"project": { "type": "keyword"},
5656
"service": { "type": "keyword"},

schema/elasticsearch/visibility/index_template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"CustomStringField": { "type": "text" },
5353
"CustomKeywordField": { "type": "keyword"},
5454
"CustomIntField": { "type": "long"},
55-
"CustomBoolField": { "type": "boolean"},
5655
"CustomDoubleField": { "type": "double"},
56+
"CustomBoolField": { "type": "boolean"},
5757
"CustomDatetimeField": { "type": "date"},
5858
"project": { "type": "keyword"},
5959
"service": { "type": "keyword"},

0 commit comments

Comments
 (0)