Skip to content
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

Merged
merged 19 commits into from
Nov 22, 2023

Conversation

tdeebswihart
Copy link
Contributor

@tdeebswihart tdeebswihart commented Oct 26, 2023

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.Duration
  • V2-generated structs embed locks, so you cannot dereference them. go vet will scream at you about this. If you need a copy, use proto.Clone.
  • Proto objects, or objects embedding protos, cannot be compared using reflect.DeepEqual or anything that uses it. This includes testify and mock equality testers!
    • You will need to use the protorequire ro protoassertpackages instead. I've implemented proto-compatible assertions there for all cases I've encountered
    • If you need reflect.DeepEqual for any reason you can use go.temporal.io/api/temporalproto.DeepEqual instead

Release 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.

Copy link
Member

@cretz cretz left a 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.

@tdeebswihart tdeebswihart marked this pull request as draft October 26, 2023 16:31
@tdeebswihart tdeebswihart marked this pull request as ready for review October 27, 2023 22:53
@tdeebswihart tdeebswihart requested a review from cretz October 27, 2023 22:53
@@ -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)},
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns Nov 17, 2023

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

Copy link
Contributor Author

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

@tdeebswihart tdeebswihart force-pushed the nomo-gogo branch 2 times, most recently from 83eabe6 to 9cdfbe1 Compare November 21, 2023 22:55
@tdeebswihart tdeebswihart merged commit 6e7388c into temporalio:main Nov 22, 2023
@tdeebswihart tdeebswihart deleted the nomo-gogo branch November 22, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants