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

Update ugorji/go to latest #5676

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8741,12 +8741,17 @@ func (d *DesiredUpdates) GoString() string {

// msgpackHandle is a shared handle for encoding/decoding of structs
var MsgpackHandle = func() *codec.MsgpackHandle {
h := &codec.MsgpackHandle{RawToString: true}
h := &codec.MsgpackHandle{}
h.RawToString = true

// maintain binary format from time prior to upgrading latest ugorji
h.BasicHandle.TimeNotBuiltin = true

// Sets the default type for decoding a map into a nil interface{}.
// This is necessary in particular because we store the driver configs as a
// nil interface{}.
h.MapType = reflect.TypeOf(map[string]interface{}(nil))

return h
}()

Expand All @@ -8766,7 +8771,11 @@ var (
// behind. I feel like its original purpose was to pin at a stable version but
// now we can accomplish this with vendoring.
var HashiMsgpackHandle = func() *hcodec.MsgpackHandle {
h := &hcodec.MsgpackHandle{RawToString: true}
h := &hcodec.MsgpackHandle{}
h.RawToString = true

// maintain binary format from time prior to upgrading latest ugorji
h.BasicHandle.TimeNotBuiltin = true

// Sets the default type for decoding a map into a nil interface{}.
// This is necessary in particular because we store the driver configs as a
Expand Down
4 changes: 4 additions & 0 deletions plugins/base/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func (p *PluginBase) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker,
var MsgpackHandle = func() *codec.MsgpackHandle {
h := &codec.MsgpackHandle{}
h.RawToString = true

// maintain binary format from time prior to upgrading latest ugorji
h.BasicHandle.TimeNotBuiltin = true

h.MapType = reflect.TypeOf(map[string]interface{}(nil))
return h
}()
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-codecgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

# Match entry in vendor.json
GIT_TAG="0053ebfd9d0ee06ccefbfe17072021e1d4acebee"
GIT_TAG="08f7b401aef15f3d544472dd46bf6788cdfe55bf"
echo "Installing codec/codecgen@${GIT_TAG} ..."

# Either fetch in existing git repo or use go get to clone
Expand Down
39 changes: 18 additions & 21 deletions vendor/github.com/hashicorp/go-msgpack/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 0 additions & 143 deletions vendor/github.com/hashicorp/go-msgpack/codec/0doc.go

This file was deleted.

Loading