Skip to content

Conversation

captainsafia
Copy link
Member

@captainsafia captainsafia commented Sep 23, 2024

Description

This PR backports #57972 to resolve issues with concurrent requests to OpenAPI documents (fixes #57876).

This PR also addresses a set of issues with generated schemas:

Customer Impact

This PR resolves a set of bugs reported by users of .NET 9 RC 1 for which no viable workarounds exist.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Changes localized to OpenAPI package.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

captainsafia and others added 4 commits September 22, 2024 13:21
* fix: Allow concurrent requests

* test: Update test

* test: Use Parallel.ForEachAsync

* feat: Use valueFactory overload

* feat: Pass valueFactory directly
@captainsafia captainsafia requested a review from a team as a code owner September 23, 2024 03:06
@ghost ghost added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Sep 23, 2024
@captainsafia captainsafia added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc Servicing-consider Shiproom approval is required for the issue and removed old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels labels Sep 23, 2024
@wtgodbe wtgodbe added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Sep 24, 2024
@wtgodbe
Copy link
Member

wtgodbe commented Sep 24, 2024

Approved over email

@wtgodbe wtgodbe merged commit 029aaae into release/9.0 Sep 25, 2024
25 checks passed
@wtgodbe wtgodbe deleted the safia/oai-bug-fixes branch September 25, 2024 22:23
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.0 milestone Sep 25, 2024
@wtgodbe
Copy link
Member

wtgodbe commented Sep 26, 2024

/backport to main

Copy link
Contributor

Started backporting to main: https://github.com/dotnet/aspnetcore/actions/runs/11056853055

Copy link
Contributor

@wtgodbe backporting to main failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix JsonUnmappedMemberHandling attribute handling to close #57981
Applying: Fix enum handling for MVC actions to close #57979
Applying: Fix self-referential schema handling to close #58006
Applying: Fix concurrent request handling for OpenAPI documents (#57972)
error: sha1 information is lacking or useless (src/OpenApi/src/Services/OpenApiDocumentService.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0004 Fix concurrent request handling for OpenAPI documents (#57972)
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@wtgodbe an error occurred while backporting to main, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

captainsafia added a commit that referenced this pull request Sep 26, 2024
* Fix JsonUnmappedMemberHandling attribute handling to close #57981

* Fix enum handling for MVC actions to close #57979

* Fix self-referential schema handling to close #58006

* Fix concurrent request handling for OpenAPI documents (#57972)

* fix: Allow concurrent requests

* test: Update test

* test: Use Parallel.ForEachAsync

* feat: Use valueFactory overload

* feat: Pass valueFactory directly

* Harden self-referencing schema ID check

---------

Co-authored-by: Justin Lampe <[email protected]>
captainsafia added a commit that referenced this pull request Sep 26, 2024
… (#58096)

* Fix JsonUnmappedMemberHandling attribute handling to close #57981

* Fix enum handling for MVC actions to close #57979

* Fix self-referential schema handling to close #58006

* Fix concurrent request handling for OpenAPI documents (#57972)

* fix: Allow concurrent requests

* test: Update test

* test: Use Parallel.ForEachAsync

* feat: Use valueFactory overload

* feat: Pass valueFactory directly

* Harden self-referencing schema ID check

---------

Co-authored-by: Justin Lampe <[email protected]>
captainsafia added a commit that referenced this pull request Dec 31, 2024
… (#58096)

* Fix JsonUnmappedMemberHandling attribute handling to close #57981

* Fix enum handling for MVC actions to close #57979

* Fix self-referential schema handling to close #58006

* Fix concurrent request handling for OpenAPI documents (#57972)

* fix: Allow concurrent requests

* test: Update test

* test: Use Parallel.ForEachAsync

* feat: Use valueFactory overload

* feat: Pass valueFactory directly

* Harden self-referencing schema ID check

---------

Co-authored-by: Justin Lampe <[email protected]>
captainsafia added a commit that referenced this pull request Feb 11, 2025
… (#58096)

* Fix JsonUnmappedMemberHandling attribute handling to close #57981

* Fix enum handling for MVC actions to close #57979

* Fix self-referential schema handling to close #58006

* Fix concurrent request handling for OpenAPI documents (#57972)

* fix: Allow concurrent requests

* test: Update test

* test: Use Parallel.ForEachAsync

* feat: Use valueFactory overload

* feat: Pass valueFactory directly

* Harden self-referencing schema ID check

---------

Co-authored-by: Justin Lampe <[email protected]>
This was referenced Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants