-
Notifications
You must be signed in to change notification settings - Fork 882
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
Move search attribute validator and mapper calls to frontend service #2476
Move search attribute validator and mapper calls to frontend service #2476
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you verify that the start child event recorded in parent shows its alias (user visible) search attribute and not the actual field name (user invisible). And also the child's start workflow event.
It doesn't. The design is to map alias to field name right away and use actual field name everywhere down the road. History events and mutable state, both store search attributes using actual field name. On the way out ( |
@@ -423,6 +423,8 @@ func (c *temporalImpl) startFrontend(hosts map[string][]string, startWG *sync.Wa | |||
fx.Provide(func() authorization.JWTAudienceMapper { return nil }), | |||
fx.Provide(func() client.FactoryProvider { return client.NewFactoryProvider() }), | |||
fx.Provide(func() searchattribute.Mapper { return nil }), | |||
// Comment the line above and uncomment the line bellow to test with search attributes mapper. | |||
// fx.Provide(func() searchattribute.Mapper { return NewSearchAttributeTestMapper() }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason it cannot test the sa mapper by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will require rewrite of all tests to use aliases instead of actual search attribute field names. Ideally, I would create another test suite and setup another cluster there but this requires massive integration tests refactoring.
What changed?
Move search attribute validator and mapper calls to frontend service.
Why?
Calling search attributes mapper from history engine cause them to be mapped twice in case if workflow is started from command (child workflow and continue as new).
How did you test it?
Existing tests.
Potential risks
No risks.
Is hotfix candidate?
Maybe.