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 23.1 #1977

Merged
merged 10 commits into from
Mar 4, 2024
Merged

Release 23.1 #1977

merged 10 commits into from
Mar 4, 2024

Conversation

raman-m and others added 8 commits February 16, 2024 13:21
* Fix HttpContext.User is lost after passing MultiplexingMiddlware

* Simplify single downstream route handling

* fix

* some refactoring of long code

* add unit tests for #1396 user scenario

* Acceptance test for user forwarding

* refactor test

---------

Co-authored-by: Алексей Патрин <apatrin@croc.ru>
Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
* #1844 More open customization of Polly use

* Update src/Ocelot.Provider.Polly/OcelotBuilderExtensions.cs

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>

* #1844 More open customization of Polly use

* Update src/Ocelot.Provider.Polly/OcelotBuilderExtensions.cs

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>

* fix compilation errors

* add xml doc

* More XML-docs

* remove new line separators

---------

Co-authored-by: Ray <rmessie@traceparts.com>
Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
* Fix a bug in HttpRequesterMiddleware.cs, 

BadRequest should be logged as debug!

* Clean code: refactor `CreateLogBasedOnResponse`

* Unit tests

* Remove redundant if-checking

---------

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
… it unique (#1944)

* Fix the route key format used for load balancing

The old key format did not contain enough information to disambiguate routes based on an UpstreamHost. This was especially problematic when a ServiceName was used in conjuction with Service Discovery, instead of DownstreamHostAndPorts configuration.

Resolves #1496

* Update tests

* Amend test

* Remove empty key parts

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>

* Amend

* Make route keys uniform, keep empty parts

* Fix wrong usage of dictionary TryGetValue

* Coalesce empty strings or white space, use fallback values

* Add back host and ports

* Remove redundant load balancer type check

* Fix TryGetValue with null argument

* Revert removal of balancer type check, still relevant

* Improve helper local functions

* Fix outdated comment

* Add acceptance test

* Refactor RouteKeyCreator class

* Add developer's XML docs

* Add TODO

* Convert fact to theory

* Review unit tests

* Fix incorrect usages of ServiceHandler, make sure all are correctly Disposed

* Fix services responding to wrong path

* Add Consul counter

* Reduce summary length

* Rename OkResponse->MapGet

* Refactor `LoadBalancerHouse` class because of DRY principle

---------

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
… Transfer-Encoding: chunked if Content-Length is known (#1972)

* Avoid content if original request has no content and avoid Transfer-Encoding: chunked if Content-Length is known

* * Optimized mapping of empty Content
* Added tests for mapping requests

* Added tests to verify that mapped content is streamed

* Changes requested by review

* Changes requested by review

* Be a little more conservative in streaming test and use 25GB instead if 100GB test data

* Reduced streaming test content to 1GB as requested

* Convert to file-scoped namespace

* Move `Dispose` closer to the constructor

* Move `ChunkedContent` class out

* IDE1006: Naming rule violation

* More private helpers to setup a test

* Code review: round 2

* Move common helpers to `Steps`

---------

Co-authored-by: Alexander Reinert <a.reinert@impuls-systems.de>
Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
…est body (#1769)

* Adding "quick and..." fix to the payload too large exception, adding two acceptance tests for kestrel and http sys.

* skipping test if platform is not windows

* Moving Payload too large error to HttpExceptionErrorMapper. A review of the exception handling is needed.

* Fix issues after merge in Steps.cs

* using collection expression here

* Code review by @raman-m

---------

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
@raman-m raman-m self-assigned this Mar 1, 2024
@raman-m raman-m added Jan'24 January 2024 release release Pre/Release (minor, major) labels Mar 1, 2024
@raman-m raman-m added this to the January'24 milestone Mar 1, 2024
RaynaldM
RaynaldM previously approved these changes Mar 1, 2024
…1826)

* Cleanup of Multiplexing middleware, avoiding creating copies of the Http context if only one downstream route.

* updating comments

* preparing rebase, it's a hack.

* fixing test case "Copy_User_ToTarget",  method name has changed.

* adding some unit tests, checking that if 1 route, ProcessSingleRoute is called and no copies of context are made, if more than 2 Map is called, then more than 2 copies are created.

* Applying refactoring suggested.

* some code cleanup

* Some code cleanup in Aggregate Logic

* Cleanup in Aggregate Tests, verifying multiplexer cleanup

* Finalizing unit test, with complex keys.

* some code refactoring and applying suggestions from reviews

* Update requestaggregation.rst

Recover docs

* updating docs

* Update requestaggregation.rst

* Update requestaggregation.rst

* Code review by @raman-m

* Inherit `Steps` functionality instead of private aggregation

---------

Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
@raman-m
Copy link
Member Author

raman-m commented Mar 4, 2024

January 2024 (version 23.1.0-beta0001) aka Hornussen release

Codenamed as Hornussen Sport
Read the Docs: Ocelot 23.1

Focus On

Multiplexing middleware aka Request Aggregation feature
  • Significant refactoring and design review of the Multiplexer
  • Optimizing multiplexer performance: HttpContext is not copied when there is only one downstream route, and etc.
  • Fixed the bug in the multiplexer: HttpContext.User information was not copied if there was more than one downstream request.
System routing. Content streaming when Transfer-Encoding: 'chunked'
  • Correction of the bug when creating requests: The header Transfer-Encoding: chunked was present even when there was no content or the request body size was 0. These cases are now addressed.
Updates of the features: QoS, Load Balancer and Error Status Codes
  • Quality of Service: Possibility of implementation of custom Polly v8.2 providers. New AddPolly extension methods.
  • Load Balancer: Extension of the route key format, ensuring that the key remains unique for cases of UpstreamHost route property and ServiceName vs ServiceNamespace properties in Consul setup.
  • Error Status Codes: When 413 Content Too Large, Ocelot now returns a 413 PayloadTooLargeError (Ocelot error code 41).
Documentation for Request Aggregation
Stabilization aka bug fixing

Honoring 🏅 aka Top Contributors 👏

1st 🥇 goes to Guillaume Gnaegi for delivering 2 features
2nd 🥈 goes to Alexander Reinert for delivering 1 feature in 8 files changed
3rd 🥉 goes to Steven for delivering 1 feature in 5 files changed with 353 insertions

Starring ⭐ aka Release Influencers :bowtie:

⭐⭐ Guillaume Gnaegi
⭐ Alexander Reinert
⭐ Chris Williams
⭐ Masoud Bahrami
⭐ Raynald Messi├й
⭐ Steven
⭐ Ugway77

Features in Release 23.1.0-beta0001

36986d6 by Guillaume Gnaegi on Friday, March 01 at 18:33 →
#1825 #1330 #1287 #1069 Improvements of the multiplexing middleware (#1826)
42ac3ca by Guillaume Gnaegi on Friday, March 01 at 12:00 →
#749 Bad error handling for IOException while reading incoming request body (#1769)
319e397 by Alexander Reinert on Thursday, February 29 at 22:16 →
#1971 #928 Avoid content if original request has no content and avoid Transfer-Encoding: chunked if Content-Length is known (#1972)
8845d1b by Steven on Thursday, February 29 at 09:44 →
#849 #1496 Extend the route key format used for load balancing making it unique (#1944)
171e3a7 by Masoud Bahrami on Tuesday, February 27 at 19:05 →
Logging bug in HttpRequesterMiddleware (#1953)
0404c24 by Raynald Messi├й on Monday, February 26 at 09:24 →
#1844 More open customization of Polly use (#1974)
108bede by Ugway77 on Thursday, February 22 at 23:38 →
#1396 Lost context User in MultiplexingMiddleware (#1462)
a9dff7c by Chris Williams on Thursday, February 22 at 04:25 →
Fix typo in the name of the DistributedCacheRateLimitCounterHandler class (#1969) by @williamscs

@raman-m raman-m requested a review from RaynaldM March 4, 2024 11:19
@raman-m raman-m merged commit e5ca32b into main Mar 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jan'24 January 2024 release release Pre/Release (minor, major)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants