diff --git a/client/client.go b/client/client.go index 44f29d89e..34fa7be57 100644 --- a/client/client.go +++ b/client/client.go @@ -751,7 +751,9 @@ type HistoryJSONOptions struct { // not close the reader if it is closeable. func HistoryFromJSON(r io.Reader, options HistoryJSONOptions) (*historypb.History, error) { hist := &historypb.History{} - dec := temporalproto.NewJSONDecoder(r) + // We set DiscardUnknown here because the history may have been created by a previous + // version of our protos + dec := temporalproto.NewJSONDecoder(r, true) if err := dec.Decode(hist); err != nil { return nil, err } diff --git a/contrib/datadog/go.mod b/contrib/datadog/go.mod index acb31c937..4c779866b 100644 --- a/contrib/datadog/go.mod +++ b/contrib/datadog/go.mod @@ -9,6 +9,6 @@ require ( ) replace ( - go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d + go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a go.temporal.io/sdk => ../../ ) diff --git a/contrib/datadog/go.sum b/contrib/datadog/go.sum index b734bf120..8a3072926 100644 --- a/contrib/datadog/go.sum +++ b/contrib/datadog/go.sum @@ -1647,8 +1647,8 @@ github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/tidwall/btree v0.3.0/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= github.com/tidwall/btree v1.1.0/go.mod h1:TzIRzen6yHbibdSfK6t8QimqbUnoxUSrZfeW7Uob0q4= github.com/tidwall/buntdb v1.2.0/go.mod h1:XLza/dhlwzO6dc5o/KWor4kfZSt3BP8QV+77ZMKfI58= diff --git a/contrib/opentelemetry/go.mod b/contrib/opentelemetry/go.mod index 5bb9a09bb..23bf67c86 100644 --- a/contrib/opentelemetry/go.mod +++ b/contrib/opentelemetry/go.mod @@ -11,6 +11,6 @@ require ( ) replace ( - go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d + go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a go.temporal.io/sdk => ../../ ) diff --git a/contrib/opentelemetry/go.sum b/contrib/opentelemetry/go.sum index 387776632..009656b66 100644 --- a/contrib/opentelemetry/go.sum +++ b/contrib/opentelemetry/go.sum @@ -1223,8 +1223,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/contrib/opentracing/go.mod b/contrib/opentracing/go.mod index 91a61a7d6..00c19c170 100644 --- a/contrib/opentracing/go.mod +++ b/contrib/opentracing/go.mod @@ -9,6 +9,6 @@ require ( ) replace ( - go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d + go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a go.temporal.io/sdk => ../../ ) diff --git a/contrib/opentracing/go.sum b/contrib/opentracing/go.sum index 920141cee..6e4f94ba2 100644 --- a/contrib/opentracing/go.sum +++ b/contrib/opentracing/go.sum @@ -1225,8 +1225,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/contrib/tally/go.mod b/contrib/tally/go.mod index fb465a32a..5d00557b2 100644 --- a/contrib/tally/go.mod +++ b/contrib/tally/go.mod @@ -9,6 +9,6 @@ require ( ) replace ( - go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d + go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a go.temporal.io/sdk => ../../ ) diff --git a/contrib/tally/go.sum b/contrib/tally/go.sum index 844ad5c84..9971802fb 100644 --- a/contrib/tally/go.sum +++ b/contrib/tally/go.sum @@ -1268,8 +1268,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/twmb/murmur3 v1.1.5 h1:i9OLS9fkuLzBXjt6dptlAEyk58fJsSTXbRg3SgVyqgk= github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/uber-go/tally/v4 v4.1.1 h1:jhy6WOZp4nHyCqeV43x3Wz370LXUGBhgW2JmzOIHCWI= diff --git a/go.mod b/go.mod index 564812fd9..9f4308104 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module go.temporal.io/sdk go 1.20 -replace go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d +replace go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a require ( github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a diff --git a/go.sum b/go.sum index b6d17e2b5..052530550 100644 --- a/go.sum +++ b/go.sum @@ -69,8 +69,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/internal/internal_worker.go b/internal/internal_worker.go index 80f0edb5e..4025f0f13 100644 --- a/internal/internal_worker.go +++ b/internal/internal_worker.go @@ -1428,7 +1428,7 @@ func extractHistoryFromFile(jsonfileName string, lastEventID int64) (*historypb. } hist := &historypb.History{} - dec := temporalproto.NewJSONDecoder(reader) + dec := temporalproto.NewJSONDecoder(reader, true) if err := dec.Decode(hist); err != nil { return nil, err } diff --git a/test/go.mod b/test/go.mod index 714a76f93..a380735f4 100644 --- a/test/go.mod +++ b/test/go.mod @@ -23,7 +23,7 @@ require ( ) replace ( - go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d + go.temporal.io/api => github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a go.temporal.io/sdk => ../ go.temporal.io/sdk/contrib/opentelemetry => ../contrib/opentelemetry go.temporal.io/sdk/contrib/opentracing => ../contrib/opentracing diff --git a/test/go.sum b/test/go.sum index 6694786f4..615b59800 100644 --- a/test/go.sum +++ b/test/go.sum @@ -1270,8 +1270,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d h1:xETd3gNYJicu9aQYNO9/59uRiYg7n7XJX+uqdIvhYCQ= -github.com/tdeebswihart/temporal-api-go v0.0.0-20231027221743-bfe668b5925d/go.mod h1:r1sqJqp2hOUjvYU6JwaOw+lcieKyd3HkJ6TZscHsFP4= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a h1:0QeOkeByuuyuyKjsb1s8tw46TcHzPE/IenUxKsfHP0s= +github.com/tdeebswihart/temporal-api-go v0.0.0-20231030163055-872ab2d7375a/go.mod h1:ZMitJTNmbXZkOJENNfv6wSysT4UenqGL918N5N6SH4I= github.com/twmb/murmur3 v1.1.5 h1:i9OLS9fkuLzBXjt6dptlAEyk58fJsSTXbRg3SgVyqgk= github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/uber-go/tally/v4 v4.1.1 h1:jhy6WOZp4nHyCqeV43x3Wz370LXUGBhgW2JmzOIHCWI=