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(logging): Support numbers when unmarshaling Severity #4216

Merged
merged 10 commits into from Jun 14, 2021

Conversation

alutman
Copy link
Contributor

@alutman alutman commented Jun 4, 2021

logging.Entry.Severity is written out as a JSON number during
Marshalling but has an UnmarshalJSON method that only supports Severity
as as string.

This commit adds support to unmarshal JSON numbers in addition to
strings so Marshalling then Unmarshalling the same object works without
error

Fixes #4215

logging.Entry.Severity is written out as a JSON number during
Marshalling but has an UnmarshalJSON method that only supports Severity
as as string.

This commit adds support to unmarshal JSON numbers in addition to
strings so Marshalling then Unmarshalling the same object works without
error
@alutman alutman requested review from a team as code owners June 4, 2021 01:42
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 4, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the Cloud Logging API. label Jun 4, 2021
@0xSage 0xSage added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 4, 2021
@0xSage
Copy link
Contributor

0xSage commented Jun 4, 2021

Thanks for this!

@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 4, 2021
@snippet-bot
Copy link

snippet-bot bot commented Jun 11, 2021

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@0xSage
Copy link
Contributor

0xSage commented Jun 14, 2021

@alutman do you want us to merge this - is it ready?

With how CI is configured and given this repo has a lot of PRs updating changes, you mgiht be stuck in a cycle of having to update this branch, and then wait for someone internal to approve HEAD, in order for CI to run, before it can be merged

Let us know if this PR is ready, and I can merge for you.

@0xSage 0xSage added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2021
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2021
@alutman
Copy link
Contributor Author

alutman commented Jun 14, 2021

@nicoleczhu
Yes please, merge it. It's ready.

@0xSage 0xSage merged commit a08b97d into googleapis:master Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logging: log.Entry.Severity can't unmarshal after marshalling
3 participants