Skip to content

[release/8.0] Fix reading null struct property value in gRPC JSON transcoding #52469

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

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 30, 2023

Backport of #52442 to release/8.0

/cc @JamesNK

Fix reading null struct property value in gRPC JSON transcoding

Struct is a Protobuf type that represents JSON-like data, e.g.

  • List
  • Map
  • String
  • Bool
  • Integer
  • Null

Reading null values to a struct resulted in an error. We set a null reference when Struct requires Value of type null

The fix is to make the Value JSON converter handle null values, and then return a Value of type null to the struct.

Fixes #51521

Customer Impact

Apps are unable to send null values to a gRPC JSON transcoding server in struct values. They are either forced to change the client or are stuck if they can't.

There isn't a workaround.

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

Risk

  • High
  • Medium
  • Low

This is a minor change to the Microsoft.AspNetCore.Grpc.JsonTranscoding package. Nothing else in .NET depends on it.
Null values previously errored. This change only impacts the JsonConverter for the Value type.

Verification

  • Manual (required)
  • Automated

After:
image

Note: structValue has null/bool/string values.

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@ghost ghost added the area-grpc Includes: GRPC wire-up, templates label Nov 30, 2023
@ghost ghost added this to the 8.0.x milestone Nov 30, 2023
@ghost
Copy link

ghost commented Nov 30, 2023

Hi @github-actions[bot]. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@JamesNK JamesNK added the Servicing-consider Shiproom approval is required for the issue label Nov 30, 2023
@ghost
Copy link

ghost commented Nov 30, 2023

Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@JamesNK JamesNK added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Nov 30, 2023
@ghost
Copy link

ghost commented Nov 30, 2023

Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@JamesNK
Copy link
Member

JamesNK commented Nov 30, 2023

Email approval

@ghost
Copy link

ghost commented Dec 7, 2023

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@ghost ghost added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Dec 7, 2023
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 3, 2024
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 3, 2024
@wtgodbe
Copy link
Member

wtgodbe commented Jan 3, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@wtgodbe wtgodbe merged commit 599595c into release/8.0 Jan 4, 2024
@wtgodbe wtgodbe deleted the backport/pr-52442-to-release/8.0 branch January 4, 2024 04:52
@ghost ghost modified the milestones: 8.0.x, 8.0.2 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-grpc Includes: GRPC wire-up, templates area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-approved Shiproom has approved the issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants