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

Fix bug for Issue: #554 MapObjectEncoder does not match jsonEncoder #1017

Merged

Conversation

sammyrnycreal
Copy link
Contributor

@sammyrnycreal sammyrnycreal commented Oct 3, 2021

Fix bug

MapObjectEncoder does not match jsonEncoder #554

Problem was that new openNamespaces that are created during AppendObject() call were not closed.

Note, ONLY new openNamespaces that are created during AppendObject() are closed. If they were created at prior to AppendObject() call, it will remain open till EncodeEntry() call completes.

  • make all passes all test.

@jkanywhere This will resolve the issue you raised. I included the test you wrote up here Thank you, that helped me find the bug.

MapObjectEncoder does not match jsonEncoder
(uber-go#554)

 Problem was that new openNamespaces that are created during AppendObject() call were not closed.

 Note, ONLY new openNamespaces that are created during AppendObject() are closed. If they were created at prior to AppendObject() call, it will remain open till EncodeEntry() call completes.
@CLAassistant
Copy link

CLAassistant commented Oct 3, 2021

CLA assistant check
All committers have signed the CLA.

@sammyrnycreal sammyrnycreal changed the title Fix for Issue: #554 MapObjectEncoder does not match jsonEncoder Fix bug for Issue: #554 MapObjectEncoder does not match jsonEncoder Oct 3, 2021
@sammyrnycreal
Copy link
Contributor Author

Hi @moisesvega @manjari25, Can I get some 👀 on this PR and have it merged in, if possible?

@sammyrnycreal
Copy link
Contributor Author

Hi @abhinav Do you know whom I can ping to get this PR reviewed and merged in?

@abhinav
Copy link
Contributor

abhinav commented Nov 5, 2021

@sammyrnycreal Thanks for the fix and apologies for the delay!
We'll have someone look at this soon.

Internal issue ref: GO-987

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #1017 (9f6f2fc) into master (2216968) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1017   +/-   ##
=======================================
  Coverage   98.20%   98.21%           
=======================================
  Files          47       47           
  Lines        2064     2069    +5     
=======================================
+ Hits         2027     2032    +5     
  Misses         29       29           
  Partials        8        8           
Impacted Files Coverage Δ
zapcore/json_encoder.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2216968...9f6f2fc. Read the comment docs.

abhinav
abhinav approved these changes Nov 8, 2021
Copy link
Contributor

@abhinav abhinav left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix @sammyrnycreal!

sywhang
sywhang approved these changes Nov 8, 2021
Copy link
Contributor

@sywhang sywhang left a comment

Choose a reason for hiding this comment

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

LGTM

@abhinav abhinav merged commit b62116b into uber-go:master Nov 8, 2021
6 checks passed
@abhinav
Copy link
Contributor

abhinav commented Nov 8, 2021

Thanks again, @sammyrnycreal!

@sammyrnycreal
Copy link
Contributor Author

@abhinav Anytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants