Skip to content

Commit

Permalink
Merge branch 'main' into jira/lwolczynski/IWF-105
Browse files Browse the repository at this point in the history
  • Loading branch information
lwolczynski authored Nov 18, 2024
2 parents 2afa674 + aa564e1 commit 397e211
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
6 changes: 5 additions & 1 deletion docker-compose/init-ci-temporal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ for run in {1..120}; do
sleep 0.1
temporal operator search-attribute create --name CustomStringField --type Text
sleep 0.1
temporal operator search-attribute create --name CustomKeywordArrayField --type KeywordList
sleep 0.1
temporal operator search-attribute create --name CustomTextField --type Text
sleep 0.1

if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField" ] ; then
if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField" && checkExists "CustomKeywordArrayField" ] ; then
echo "All search attributes are registered"
break
fi
Expand Down
4 changes: 3 additions & 1 deletion docker-compose/init-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ for run in {1..60}; do
sleep 0.1
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
sleep 0.1
if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" ] ; then
temporal operator search-attribute create --name CustomKeywordArrayField --type KeywordList
sleep 0.1
if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordArrayField" ] ; then
echo "All search attributes are registered"
break
fi
Expand Down
9 changes: 9 additions & 0 deletions integ/set_search_attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ func TestSetSearchAttributes(t *testing.T) {
Key: iwfidl.PtrString(persistence.TestSearchAttributeKeywordKey),
ValueType: ptr.Any(iwfidl.KEYWORD),
StringValue: iwfidl.PtrString(persistence.TestSearchAttributeKeywordValue1),
},
iwfidl.SearchAttribute{
Key: iwfidl.PtrString(persistence.TestSearchAttributeKeywordArrayKey),
ValueType: ptr.Any(iwfidl.KEYWORD_ARRAY),
StringArrayValue: []string{persistence.TestSearchAttributeKeywordValue2, persistence.TestSearchAttributeKeywordValue1},
})

setReq := apiClient.DefaultApi.ApiV1WorkflowSearchattributesSetPost(context.Background())
Expand All @@ -84,6 +89,10 @@ func TestSetSearchAttributes(t *testing.T) {
Key: iwfidl.PtrString(persistence.TestSearchAttributeKeywordKey),
ValueType: ptr.Any(iwfidl.KEYWORD),
},
{
Key: iwfidl.PtrString(persistence.TestSearchAttributeKeywordArrayKey),
ValueType: ptr.Any(iwfidl.KEYWORD_ARRAY),
},
}}).Execute()
panicAtHttpError(err, httpRespGet)

Expand Down
15 changes: 8 additions & 7 deletions integ/workflow/persistence/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ const (
TestSearchAttributeKeywordValue1 = "keyword-value1"
TestSearchAttributeKeywordValue2 = "keyword-value2"

TestSearchAttributeIntKey = "CustomIntField"
TestSearchAttributeBoolKey = "CustomBoolField"
TestSearchAttributeDoubleKey = "CustomDoubleField"
TestSearchAttributeDatetimeKey = "CustomDatetimeField"
TestSearchAttributeTextKey = "CustomStringField"
TestSearchAttributeIntValue1 = 1
TestSearchAttributeIntValue2 = 2
TestSearchAttributeKeywordArrayKey = "CustomKeywordArrayField"
TestSearchAttributeIntKey = "CustomIntField"
TestSearchAttributeBoolKey = "CustomBoolField"
TestSearchAttributeDoubleKey = "CustomDoubleField"
TestSearchAttributeDatetimeKey = "CustomDatetimeField"
TestSearchAttributeTextKey = "CustomStringField"
TestSearchAttributeIntValue1 = 1
TestSearchAttributeIntValue2 = 2
)

var TestDataObjectVal1 = iwfidl.EncodedObject{
Expand Down

0 comments on commit 397e211

Please sign in to comment.