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

pkg/private/serrors: do not use reflect encoder for all context #4594

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Aug 8, 2024

Previously, the context was always encoded using the reflect encoder (which is just json marshaling). This has the bad side effect that the usual marshaling methods are not respected. E.g., error context that would in theory implement the fmt.Stringer method were just JSON encoded.

With this change, we leave it up to zap to decide how the values are encoded based on their type.

Previously, the context was always encoded using the reflect encoder (which is just json marshaling).
This has the bad side effect that the usual marshaling methods are not respected.
E.g., error context that would in theory implement the fmt.Stringer method were just JSON encoded.

With this change, we leave it up to zap to decide how the values are encoded based on their type.
@jiceatscion
Copy link
Contributor

This change is Reviewable

Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lukedirtwalker)

Copy link
Contributor Author

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @lukedirtwalker)

Copy link
Contributor Author

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lukedirtwalker)

@oncilla oncilla enabled auto-merge (squash) August 9, 2024 09:26
@oncilla oncilla merged commit 5b4d3a6 into scionproto:master Aug 9, 2024
5 checks passed
oncilla added a commit to oncilla/scion that referenced this pull request Aug 14, 2024
…context (scionproto#4594)

Previously, the context was always encoded using the reflect encoder
(which is just json marshaling). This has the bad side effect that the
usual marshaling methods are not respected. E.g., error context that
would in theory implement the fmt.Stringer method were just JSON
encoded.

With this change, we leave it up to zap to decide how the values are
encoded based on their type.
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.

2 participants