-
Notifications
You must be signed in to change notification settings - Fork 817
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
Drop pointer for activity id fields #3949
Drop pointer for activity id fields #3949
Conversation
host/integration_test.go
Outdated
@@ -2431,7 +2431,7 @@ func (s *integrationSuite) TestDecisionTaskFailed() { | |||
return nil, []*types.Decision{{ | |||
DecisionType: types.DecisionTypeScheduleActivityTask.Ptr(), | |||
ScheduleActivityTaskDecisionAttributes: &types.ScheduleActivityTaskDecisionAttributes{ | |||
ActivityID: common.StringPtr(strconv.Itoa(int(1))), | |||
ActivityID: strconv.Itoa(int(1)), |
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.
"1"
though obviously minor (same with line 2610)
host/queryworkflow_test.go
Outdated
@@ -86,7 +86,7 @@ func (s *integrationSuite) TestQueryWorkflow_Sticky() { | |||
return nil, []*types.Decision{{ | |||
DecisionType: types.DecisionTypeScheduleActivityTask.Ptr(), | |||
ScheduleActivityTaskDecisionAttributes: &types.ScheduleActivityTaskDecisionAttributes{ | |||
ActivityID: common.StringPtr(strconv.Itoa(int(1))), | |||
ActivityID: strconv.Itoa(int(1)), |
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.
"1"
a few times
@@ -82,7 +82,7 @@ func (s *integrationSuite) TestResetWorkflow() { | |||
scheduleActivityCommands = append(scheduleActivityCommands, &types.Decision{ | |||
DecisionType: types.DecisionTypeScheduleActivityTask.Ptr(), | |||
ScheduleActivityTaskDecisionAttributes: &types.ScheduleActivityTaskDecisionAttributes{ | |||
ActivityID: common.StringPtr(strconv.Itoa(i)), | |||
ActivityID: strconv.Itoa(i), |
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.
"1"
... and other files. meh. you get the idea.
truly, I think this is fine to leave unless you're excited about changing them. there are far larger issues with these tests than a sub-optimal string creation, and it's not actually related to this PR.
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.
Yep, fixed all of those.
What changed?
Drop pointer for activity id fields within internal types.
Why?
This is one of PRs planned to drop pointers for always required fields in internal types. It will make them more idiomatic and easier to use. These pointer are legacy of Thrift types that were used previously through our codebase. This will also allow safer migration to grpc, as proto primitive types don't have nils by default.
How did you test it?
Passing build and existing tests.
Potential risks