Skip to content

Commit

Permalink
Replace gogo protobuf (#1256)
Browse files Browse the repository at this point in the history
**What was 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.

**Breaking changes**

- `*time.Time` in proto structs will now be [timestamppb.Timestamp](https://pkg.go.dev/google.golang.org/protobuf@v1.31.0/types/known/timestamppb#section-documentation)
- `*time.Duration` will now be [durationpb.Duration](https://pkg.go.dev/google.golang.org/protobuf/types/known/durationpb)
- V2-generated structs embed locks, so you cannot dereference them willy-nilly. `go vet` will scream at you about this
- Proto enums will, when formatted to JSON, now be in `SCREAMING_SNAKE_CASE` rather than `PascalCase`. We decided (in discussion with the SDK team) that now was as good a time as any to rip the bandage off.

Note that history loading will not be impacted by the JSON changes: I rewrote history loading to dynamically fix incoming history JSON data (like all our other sdks); you can find this code in [my fork of our go API](https://github.com/tdeebswihart/temporal-api-go/blob/master/internal/temporalhistoryv1/load.go) alongside its tests.
  • Loading branch information
tdeebswihart authored Nov 21, 2023
1 parent 8068455 commit f9d73bf
Show file tree
Hide file tree
Showing 53 changed files with 956 additions and 11,380 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ jobs:
go-repo-path: ${{github.event.pull_request.head.repo.full_name}}
version: ${{github.event.pull_request.head.ref}}
version-is-repo-ref: true
features-repo-path: "tdeebswihart/temporal-features"
features-repo-ref: "nomo-gogo"
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test bins clean cover cover-ci check errcheck staticcheck lint fmt
.PHONY: test bins clean cover cover-ci check errcheck staticcheck lint fmt gomodtidy check

# default target
default: check test
Expand Down Expand Up @@ -55,7 +55,7 @@ integration-test-normal-cache: $(BUILD)/dummy
(cd "$$dir" && go test $(TEST_ARG) . -coverprofile=$(INTEG_NORMAL_CACHE_COVER_FILE) -coverpkg=./...) || exit 1; \
done;

test: unit-test integration-test-zero-cache integration-test-normal-cache
test: gomodtidy unit-test integration-test-zero-cache integration-test-normal-cache

merge-coverage:
@echo "mode: atomic"
Expand Down Expand Up @@ -90,3 +90,6 @@ clean:
rm -rf $(BUILD)

check: vet errcheck staticcheck copyright bins

gomodtidy:
$(shell find . -name go.mod | xargs dirname | xargs -P 4 -I{} bash -c 'cd {} && go mod tidy')
44 changes: 43 additions & 1 deletion contrib/datadog/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,53 @@
module go.temporal.io/sdk/contrib/datadog

go 1.16
go 1.20

require (
github.com/stretchr/testify v1.8.4
go.temporal.io/sdk v1.12.0
gopkg.in/DataDog/dd-trace-go.v1 v1.42.0
)

require (
github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583 // indirect
github.com/DataDog/datadog-go v4.8.2+incompatible // indirect
github.com/DataDog/datadog-go/v5 v5.0.2 // indirect
github.com/DataDog/sketches-go v1.2.1 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tinylib/msgp v1.1.2 // indirect
go.temporal.io/api v1.26.1-0.20231121220434-5a4d95cc60c0 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.temporal.io/sdk => ../../
2,293 changes: 27 additions & 2,266 deletions contrib/datadog/go.sum

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion contrib/opentelemetry/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.temporal.io/sdk/contrib/opentelemetry

go 1.16
go 1.20

require (
github.com/stretchr/testify v1.8.4
Expand All @@ -10,4 +10,31 @@ require (
go.temporal.io/sdk v1.12.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
go.temporal.io/api v1.26.1-0.20231121220434-5a4d95cc60c0 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.temporal.io/sdk => ../../
Loading

0 comments on commit f9d73bf

Please sign in to comment.