-
Notifications
You must be signed in to change notification settings - Fork 18
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
Replace gogo/protobuf with google/protobuf #359
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.
THIS IS A DRAFT PUT UP TO SOLICIT FEEDBACK WHILE THE PROJECT IS IN PROGRESS
May want to convert the PR to draft.
2d73484
to
7cb11a9
Compare
@@ -98,7 +100,7 @@ func (f *Fetcher) GetExecutions(ctx context.Context) ([]*workflow.WorkflowExecut | |||
Namespace: f.Namespace, | |||
MaximumPageSize: 1000, | |||
NextPageToken: nextPageToken, | |||
StartTimeFilter: &filter.StartTimeFilter{EarliestTime: &earliest}, | |||
StartTimeFilter: &filter.StartTimeFilter{EarliestTime: timestamppb.New(earliest)}, |
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.
(More a general gogoproto migration question) Just to confirm this would be a visible change to the API for users correct? and we are OK with that?
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.
To the wire format or to the Go API? The wire format will remain unchanged
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.
I meant an Go API change
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.
Ah, yes. It will be and there's no way around it
83eabe6
to
9cdfbe1
Compare
And convert the repo to use my forks
9cdfbe1
to
02a61b0
Compare
What changed?
gogo/protobuf has been replaced with Google's official go compiler.
Why?
gogo/protobuf has been deprecated for some time and the community is moving on, building new tools (like vtproto) atop google's v2 compiler.
How did you test it?
This branch is actively used by my SDK and server PRs so you can see it in use there
Potential risks
None I can think of.
Breaking changes for developers
*time.Time
in proto structs will now be timestamppb.Timestamp*time.Duration
will now be durationpb.Durationgo vet
will scream at you about this. If you need a copy, useproto.Clone
.reflect.DeepEqual
or anything that uses it. This includestestify
andmock
equality testers!protorequire
roprotoassert
packages instead. I've implemented proto-compatible assertions there for all cases I've encounteredreflect.DeepEqual
for any reason you can usego.temporal.io/api/temporalproto.DeepEqual
insteadRelease Plan
Our goal is to release our API, Go API, Go SDK, and Server all at once, then update our UI (and ui-server), CLI, and HTTP API in a second pass. Until the second pass happens no changes to our JSON formatting will be apparent to users.