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

[release/7.0] Default media type used when 'null' is passed to StringContent #81506 #83425

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 14, 2023

Backport of #81722 to release/7.0
Fixes #81506

/cc @antonfirsov @slovely

Customer Impact

We introduced an unintentional breaking change/regression in one of StringContent's constructors in .NET 7.0: passing null to the arg string contentType leads to an exception.
In .NET 6.0 we would instead use default value text/plain - see .NET 6.0 code.

While it is easy to work around (check for null and pass 'text/plain' from user code), it has hit at least 3 customers (one of them was RestSharp - set of their customers hit it), so it is annoying, and it requires customers to change their code.

Testing

Targeted test case added in the PR.

Risk

Low. This is a fairly trivial change.

@ghost
Copy link

ghost commented Mar 14, 2023

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #81722 to release/7.0

/cc @antonfirsov @slovely

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@karelz karelz added this to the 7.0.x milestone Mar 22, 2023
@karelz karelz added the Servicing-consider Issue for next servicing release review label Mar 22, 2023
@karelz
Copy link
Member

karelz commented Mar 22, 2023

This is annoying enough for customers (see updated Servicing template), that we should consider it for 7.0 servicing. Marking as such.

@rbhanda rbhanda modified the milestones: 7.0.x, 7.0.6 Mar 23, 2023
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Mar 23, 2023
@carlossanlop
Copy link
Member

I'm retargeting this PR to the new release/7.0-staging branch, which is the one that we will use from now on for servicing fixes.

Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:

  • It is approved by Tactics (signaled by adding the Servicing-approved label).
  • It's signed-off by an area owner.
  • The CI is green, or the failures are investigated as unrelated.
  • And if the PR touches an OOB package, the necessary OOB authoring changes are added.

The new process is described here: runtime/docs/project/library-servicing.md.

The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues.

Let me know if you have any questions.

@carlossanlop carlossanlop changed the base branch from release/7.0 to release/7.0-staging March 28, 2023 20:58
@antonfirsov
Copy link
Member

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov
Copy link
Member

antonfirsov commented Mar 30, 2023

@antonfirsov
Copy link
Member

Repo maintainers will now be allowed to merge their own servicing PR

@carlossanlop I don't have the rights to merge this.

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-approved Approved for servicing release labels Mar 30, 2023
@carlossanlop
Copy link
Member

I don't have the rights to merge this.

Fixed. Is the squash and merge button enabled for you now, @antonfirsov?

We had some weird issues with GitHub Actions yesterday and the new check-service-labels CI leg stopped working in servicing PRs. We made some changes and now the fix is to remove and reapply the Servicing-approved label to force the CI leg to retrigger and pass. cc @hoyosjs

@antonfirsov
Copy link
Member

@carlossanlop no, this is what I see:

image

@carlossanlop
Copy link
Member

Ah, we had an unnecessary restriction, I removed it. Can you please refresh? Is the "squash and merge" button enabled for you now, @antonfirsov?

@antonfirsov antonfirsov merged commit 88b65f9 into release/7.0-staging Mar 30, 2023
@antonfirsov
Copy link
Member

@carlossanlop was good now, merged, thanks for the help!

@carlossanlop carlossanlop deleted the backport/pr-81722-to-release/7.0 branch March 30, 2023 21:40
@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2023
@rbhanda rbhanda modified the milestones: 7.0.6, 7.0.7 Jun 1, 2023
@leecow leecow modified the milestones: 7.0.6, 7.0.7 Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants