Skip to content

Commit 9629854

Browse files
authored
Update search attributes operator commands to handle aliasing (#3871)
1 parent 7e3daf1 commit 9629854

File tree

6 files changed

+246
-38
lines changed

6 files changed

+246
-38
lines changed

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
go.opentelemetry.io/otel/metric v0.33.0
4545
go.opentelemetry.io/otel/sdk v1.11.1
4646
go.opentelemetry.io/otel/sdk/metric v0.31.0
47-
go.temporal.io/api v1.15.1-0.20230125004443-42737e40d339
47+
go.temporal.io/api v1.15.1-0.20230130221739-35f91d43296f
4848
go.temporal.io/sdk v1.20.1-0.20230125015921-1fe6824cedfe
4949
go.temporal.io/version v0.3.0
5050
go.uber.org/atomic v1.10.0
@@ -55,7 +55,7 @@ require (
5555
golang.org/x/oauth2 v0.2.0
5656
golang.org/x/time v0.2.0
5757
google.golang.org/api v0.103.0
58-
google.golang.org/grpc v1.52.1
58+
google.golang.org/grpc v1.52.3
5959
google.golang.org/grpc/examples v0.0.0-20221201195934-736197138d20
6060
gopkg.in/square/go-jose.v2 v2.6.0
6161
gopkg.in/validator.v2 v2.0.1
@@ -127,7 +127,7 @@ require (
127127
golang.org/x/tools v0.3.0 // indirect
128128
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
129129
google.golang.org/appengine v1.6.7 // indirect
130-
google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect
130+
google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa // indirect
131131
google.golang.org/protobuf v1.28.1 // indirect
132132
gopkg.in/inf.v0 v0.9.1 // indirect
133133
lukechampine.com/uint128 v1.2.0 // indirect

go.sum

+6-3
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,9 @@ go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4
840840
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
841841
go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
842842
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
843-
go.temporal.io/api v1.15.1-0.20230125004443-42737e40d339 h1:7p2abcEmI8MVqPoBt+mbcHm6t+6fUYS3dUEEAFyzloM=
844843
go.temporal.io/api v1.15.1-0.20230125004443-42737e40d339/go.mod h1:dbi2T2T/PVw0jOHF0pdc8XFDFGQoMQeNq7F0ClTKwlU=
844+
go.temporal.io/api v1.15.1-0.20230130221739-35f91d43296f h1:wNX+g/F7lQWpzftw/Su3T9a1guXB04zqaX0lnHmPQLI=
845+
go.temporal.io/api v1.15.1-0.20230130221739-35f91d43296f/go.mod h1:u3qLbaVTffmcZQbf9ueB+16LKmhkftH79SJOV517MDk=
845846
go.temporal.io/sdk v1.20.1-0.20230125015921-1fe6824cedfe h1:mlyDvuKMuxCTcEgmeZs+Qd/x69jyT/Jwq1ULhJGfPbU=
846847
go.temporal.io/sdk v1.20.1-0.20230125015921-1fe6824cedfe/go.mod h1:KtPAB/8+lVNm0aP0W5wLCyxXfHoQJbYNfM4+SfVnsJc=
847848
go.temporal.io/version v0.3.0 h1:dMrei9l9NyHt8nG6EB8vAwDLLTwx2SvRyucCSumAiig=
@@ -1365,8 +1366,9 @@ google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZV
13651366
google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
13661367
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
13671368
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
1368-
google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc=
13691369
google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
1370+
google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa h1:GZXdWYIKckxQE2EcLHLvF+KLF+bIwoxGdMUxTZizueg=
1371+
google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
13701372
google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
13711373
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
13721374
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -1405,8 +1407,9 @@ google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD
14051407
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
14061408
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
14071409
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
1408-
google.golang.org/grpc v1.52.1 h1:2NpOPk5g5Xtb0qebIEs7hNIa++PdtZLo2AQUpc1YnSU=
14091410
google.golang.org/grpc v1.52.1/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
1411+
google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ=
1412+
google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
14101413
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
14111414
google.golang.org/grpc/examples v0.0.0-20221201195934-736197138d20 h1:c4fmRt11lwyTYMMEA3IYCZR/xN7FEAJpwvPziaGXugs=
14121415
google.golang.org/grpc/examples v0.0.0-20221201195934-736197138d20/go.mod h1:jMMKnsR3nPEOSsgT/Le2GxpknJOBOQms0nWb0JRgeUM=

service/frontend/errors.go

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ var (
9494
errInvalidRemoteClusterInfo = "Unable connect to remote cluster with invalid config: %v."
9595
errUnableToStoreClusterInfo = "Unable to persist cluster info with error: %v."
9696
errUnableToDeleteClusterInfo = "Unable to delete cluster info with error: %v."
97+
errUnableToGetNamespaceInfoMessage = "Unable to get namespace info with error: %v"
98+
errUnableToCreateFrontendClientMessage = "Unable to create frontend client with error: %v."
99+
errTooManySearchAttributesMessage = "Unable to create search attributes: cannot have more than %d search attribute of type %s."
97100

98101
errListNotAllowed = serviceerror.NewPermissionDenied("List is disabled on this namespace.", "")
99102
errSchedulesNotAllowed = serviceerror.NewPermissionDenied("Schedules are disabled on this namespace.", "")

service/frontend/namespace_handler.go

+4
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,10 @@ func (d *namespaceHandlerImpl) UpdateNamespace(
511511
return nil, serviceerror.NewInvalidArgument(fmt.Sprintf("Total resetBinaries cannot exceed the max limit: %v", maxLength))
512512
}
513513
}
514+
if updatedConfig.CustomSearchAttributeAliases != nil {
515+
configurationChanged = true
516+
config.CustomSearchAttributeAliases = updatedConfig.CustomSearchAttributeAliases
517+
}
514518
}
515519

516520
if updateRequest.GetDeleteBadBinary() != "" {

0 commit comments

Comments
 (0)