Skip to content

Commit 414f634

Browse files
authored
Release 23.3.5 | Documentation patch for HTML and PDF document layouts | +semver: patch (#2172)
* index.rst patch * index.rst patch 2 * patch 3 * patch 4 * patch 5 * patch 6 * patch 7 * patch 8 * patch 9 * patch 10 * #2160 #2164 Update Rate Limiting doc: explain global configuration * Fix table header * Prepare technical release
1 parent 6088515 commit 414f634

File tree

7 files changed

+330
-299
lines changed

7 files changed

+330
-299
lines changed

Diff for: ReleaseNotes.md

+6-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,8 @@
1-
## 🔥 Hot fixing v[23.3](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0) (version {0}) aka [Blue Olympic Balumbes](https://www.youtube.com/live/j-Ou-ggS718?si=fPPwmOwjYEZq70H9&t=9518) release
2-
> Codenamed: **[Blue Olympic Fiend](https://www.youtube.com/live/j-Ou-ggS718?si=fPPwmOwjYEZq70H9&t=9518)**
1+
## :package: Documentation patch (version {0}), technical release
32
> Read the Docs: [Ocelot 23.3](https://ocelot.readthedocs.io/en/{0}/)
4-
> Hot fixed versions: [23.3.0](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0), [23.3.3](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.3)
5-
> Milestone: [v23.3 Hotfixes](https://github.com/ThreeMammals/Ocelot/milestone/8)
3+
> PDF Doc: [Ocelot 23.3](https://ocelot.readthedocs.io/_/downloads/en/{0}/pdf/)
4+
> Hot fixed version: [23.3.4](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.4)
65
7-
❤️ A heartfelt "Thank You" to [Roman Shevchik](https://github.com/antikorol) and [Massimiliano Innocenti](https://github.com/minnocenti901) for their contributions in testing and reporting the [Service Discovery](https://github.com/ThreeMammals/Ocelot/labels/Service%20Discovery) issues, #2110 and #2119, respectively!
8-
9-
### ℹ️ About
10-
This release delivers a number of bug fixes for the predecessor's [23.3.0](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0) release, which is full of new features but was not tested well. All bugs were combined into the [v23.3 Hotfixes](https://github.com/ThreeMammals/Ocelot/milestone/8) milestone.
11-
12-
Following the substantial refactoring of [Service Discovery](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/servicediscovery.rst) providers in the [23.3.0](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0) release, the community identified and we have acknowledged several [critical service discovery defects](https://github.com/ThreeMammals/Ocelot/issues?q=is%3Aissue+milestone%3A%22v23.3+Hotfixes%22+label%3A%22Service+Discovery%22) with providers such as [Kube](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/kubernetes.rst) and [Consul](https://github.com/ThreeMammals/Ocelot/blob/main/docs/features/servicediscovery.rst#consul). The `Kube` provider, while somewhat unstable, remained operational; however, the `Consul` provider was entirely non-functional.
13-
14-
📓 If your projects rely on the [Service Discovery](https://ocelot.readthedocs.io/en/latest/features/servicediscovery.html) feature and cannot function without it, please upgrade to this version to utilize the full list of features of version [23.3.0](https://github.com/ThreeMammals/Ocelot/releases/tag/23.3.0).
15-
16-
### 🧑‍💻 Technical Information
17-
A comprehensive explanation of the technical details would span several pages; therefore, it is advisable for fans of Ocelot to review all pertinent technical information within the issue descriptions associated with [the milestone](https://github.com/ThreeMammals/Ocelot/milestone/8).
18-
Our team has implemented some **Breaking Changes** which we urge you to review carefully (details follow).
19-
20-
### ⚠️ Breaking Changes
21-
Listed by priority:
22-
- `ILoadBalancer` interface alteration: Method `Lease` is now `LeaseAsync`.
23-
Interface FQN: `Ocelot.LoadBalancer.LoadBalancers.ILoadBalancer`
24-
Method FQN: `Ocelot.LoadBalancer.LoadBalancers.ILoadBalancer.LeaseAsync`
25-
- `DefaultConsulServiceBuilder` constructor modification: The first parameter's type has been changed from `Func<ConsulRegistryConfiguration>` to `IHttpContextAccessor`.
26-
Class FQN: `Ocelot.Provider.Consul.DefaultConsulServiceBuilder`
27-
Constructor signature: `public DefaultConsulServiceBuilder(IHttpContextAccessor contextAccessor, IConsulClientFactory clientFactory, IOcelotLoggerFactory loggerFactory)`
28-
- Adjustments to `Lease` type: The `Lease` has been restructured from a class to a structure and elevated in the namespace hierarchy.
29-
Struct FQN: `Ocelot.LoadBalancer.Lease`
30-
31-
📓 Should your [custom solutions](https://ocelot.readthedocs.io/en/latest/search.html?q=custom) involve overriding default Ocelot classes and their behavior, redevelopment or at least recompilation of the solution, followed by deployment, will be necessary.
6+
### :information_source: About
7+
This documentation patch pertains to HTML and PDF document layouts.
8+
No NuGet packages have been uploaded.

Diff for: build.cake

+20-10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ using System.Linq;
1414
using System.Text.RegularExpressions;
1515

1616
const string Release = "Release"; // task name, target, and Release config name
17+
const string AllFrameworks = "net6.0;net7.0;net8.0";
18+
const string LatestFramework = "net8.0";
19+
1720
var compileConfig = Argument("configuration", Release); // compile
1821

1922
// build artifacts
@@ -47,7 +50,7 @@ var releaseNotes = new List<string>();
4750
// internal build variables - don't change these.
4851
string committedVersion = "0.0.0-dev";
4952
GitVersion versioning = null;
50-
bool IsTechnicalRelease = false;
53+
bool IsTechnicalRelease = true;
5154

5255
var target = Argument("target", "Default");
5356
var slnFile = (target == Release) ? $"./Ocelot.{Release}.sln" : "./Ocelot.sln";
@@ -93,9 +96,10 @@ Task("Compile")
9396
};
9497
if (target != Release)
9598
{
96-
settings.Framework = "net8.0"; // build using .NET 8 SDK only
99+
settings.Framework = LatestFramework; // build using .NET 8 SDK only
97100
}
98-
Information($"Settings {nameof(DotNetBuildSettings.Framework)}: {settings.Framework}");
101+
string frameworkInfo = string.IsNullOrEmpty(settings.Framework) ? AllFrameworks : settings.Framework;
102+
Information($"Settings {nameof(DotNetBuildSettings.Framework)}: {frameworkInfo}");
99103
Information($"Settings {nameof(DotNetBuildSettings.Configuration)}: {settings.Configuration}");
100104
DotNetBuild(slnFile, settings);
101105
});
@@ -344,7 +348,7 @@ Task("RunUnitTests")
344348
.IsDependentOn("Compile")
345349
.Does(() =>
346350
{
347-
var testSettings = new DotNetTestSettings
351+
var settings = new DotNetTestSettings
348352
{
349353
Configuration = compileConfig,
350354
ResultsDirectory = artifactsForUnitTestsDir,
@@ -357,10 +361,12 @@ Task("RunUnitTests")
357361
};
358362
if (target != Release)
359363
{
360-
testSettings.Framework = "net8.0"; // .NET 8 SDK only
364+
settings.Framework = LatestFramework; // .NET 8 SDK only
361365
}
366+
string frameworkInfo = string.IsNullOrEmpty(settings.Framework) ? AllFrameworks : settings.Framework;
367+
Information($"Settings {nameof(DotNetTestSettings.Framework)}: {frameworkInfo}");
362368
EnsureDirectoryExists(artifactsForUnitTestsDir);
363-
DotNetTest(unitTestAssemblies, testSettings);
369+
DotNetTest(unitTestAssemblies, settings);
364370

365371
var coverageSummaryFile = GetSubDirectories(artifactsForUnitTestsDir)
366372
.First()
@@ -408,15 +414,17 @@ Task("RunAcceptanceTests")
408414
var settings = new DotNetTestSettings
409415
{
410416
Configuration = compileConfig,
411-
Framework = "net8.0", // .NET 8 SDK only
417+
// Framework = LatestFramework, // .NET 8 SDK only
412418
ArgumentCustomization = args => args
413419
.Append("--no-restore")
414420
.Append("--no-build")
415421
};
416422
if (target != Release)
417423
{
418-
settings.Framework = "net8.0"; // .NET 8 SDK only
424+
settings.Framework = LatestFramework; // .NET 8 SDK only
419425
}
426+
string frameworkInfo = string.IsNullOrEmpty(settings.Framework) ? AllFrameworks : settings.Framework;
427+
Information($"Settings {nameof(DotNetTestSettings.Framework)}: {frameworkInfo}");
420428
EnsureDirectoryExists(artifactsForAcceptanceTestsDir);
421429
DotNetTest(acceptanceTestAssemblies, settings);
422430
});
@@ -428,15 +436,17 @@ Task("RunIntegrationTests")
428436
var settings = new DotNetTestSettings
429437
{
430438
Configuration = compileConfig,
431-
Framework = "net8.0", // .NET 8 SDK only
439+
// Framework = LatestFramework, // .NET 8 SDK only
432440
ArgumentCustomization = args => args
433441
.Append("--no-restore")
434442
.Append("--no-build")
435443
};
436444
if (target != Release)
437445
{
438-
settings.Framework = "net8.0"; // .NET 8 SDK only
446+
settings.Framework = LatestFramework; // .NET 8 SDK only
439447
}
448+
string frameworkInfo = string.IsNullOrEmpty(settings.Framework) ? AllFrameworks : settings.Framework;
449+
Information($"Settings {nameof(DotNetTestSettings.Framework)}: {frameworkInfo}");
440450
EnsureDirectoryExists(artifactsForIntegrationTestsDir);
441451
DotNetTest(integrationTestAssemblies, settings);
442452
});

Diff for: docs/conf.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9-
project = 'Ocelot'
10-
copyright = ' 2016-2024 ThreeMammals Ocelot team'
11-
author = 'Tom Pallister, Raman Maksimchuk and Ocelot Core team at ThreeMammals'
9+
project = 'Ocelot Gateway'
10+
copyright = ' 2016-2024, ThreeMammals Ocelot team'
11+
author = 'Tom Pallister, Raman Maksimchuk'
1212
release = '23.3'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = []
17+
extensions = [
18+
]
1819

1920
templates_path = ['_templates']
2021
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

Diff for: docs/features/ratelimiting.rst

+44-19
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,25 @@ To implement *rate limiting* for a Route, you need to incorporate the following
2727
"Limit": 1
2828
}
2929
30-
* **ClientWhitelist** - An array containing the whitelisted clients. Clients listed here will be exempt from rate limiting.
31-
For more information on the **ClientIdHeader** option, refer to the :ref:`rl-global-configuration` section.
32-
* **EnableRateLimiting** - This setting enables rate limiting on endpoints.
33-
* **Period** - This parameter defines the duration for which the limit is applicable, such as ``1s`` (seconds), ``5m`` (minutes), ``1h`` (hours), and ``1d`` (days).
34-
If you reach the exact **Limit** of requests, the excess occurs immediately, and the **PeriodTimespan** begins.
35-
You must wait for the **PeriodTimespan** duration to pass before making another request.
36-
Should you exceed the number of requests within the period more than the **Limit** permits, the **QuotaExceededMessage** will appear in the response, accompanied by the **HttpStatusCode**.
37-
* **PeriodTimespan** - This parameter indicates the time in **seconds** after which a retry is permissible.
38-
During this interval, the **QuotaExceededMessage** will appear in the response, accompanied by an **HttpStatusCode**.
30+
* ``ClientWhitelist``: An array containing the whitelisted clients. Clients listed here will be exempt from rate limiting.
31+
For more information on the ``ClientIdHeader`` option, refer to the :ref:`rl-global-configuration` section.
32+
* ``EnableRateLimiting``: This setting enables rate limiting on endpoints.
33+
* ``Period``: This parameter defines the duration for which the limit is applicable, such as ``1s`` (seconds), ``5m`` (minutes), ``1h`` (hours), and ``1d`` (days).
34+
If you reach the exact ``Limit`` of requests, the excess occurs immediately, and the ``PeriodTimespan`` begins.
35+
You must wait for the ``PeriodTimespan`` duration to pass before making another request.
36+
Should you exceed the number of requests within the period more than the ``Limit`` permits, the ``QuotaExceededMessage`` will appear in the response, accompanied by the ``HttpStatusCode``.
37+
* ``PeriodTimespan``: This parameter indicates the time in **seconds** after which a retry is permissible.
38+
During this interval, the ``QuotaExceededMessage`` will appear in the response, accompanied by an ``HttpStatusCode``.
3939
Clients are advised to consult the ``Retry-After`` header to determine the timing of subsequent requests.
40-
* **Limit** - This parameter defines the upper limit of requests a client is allowed to make within a specified **Period**.
40+
* ``Limit``: This parameter defines the upper limit of requests a client is allowed to make within a specified ``Period``.
4141

4242
.. _rl-global-configuration:
4343

4444
Global Configuration
4545
^^^^^^^^^^^^^^^^^^^^
4646

47+
Global options are only accessible in the special :ref:`routing-dynamic` mode.
48+
4749
You can set the following in the ``GlobalConfiguration`` section of `ocelot.json`_:
4850

4951
.. code-block:: json
@@ -58,26 +60,49 @@ You can set the following in the ``GlobalConfiguration`` section of `ocelot.json
5860
}
5961
}
6062
61-
* **DisableRateLimitHeaders** - Determines if the ``X-Rate-Limit`` and ``Retry-After`` headers are disabled.
62-
* **QuotaExceededMessage** - Defines the message displayed when the quota is exceeded. It is optional and the default message is informative.
63-
* **HttpStatusCode** - Indicates the HTTP status code returned during *rate limiting*. The default value is **429** (`Too Many Requests`_).
64-
* **ClientIdHeader** - Specifies the header used to identify clients, with ``ClientId`` as the default.
6563
66-
Future and ASP.NET Core Implementation
67-
--------------------------------------
64+
.. list-table::
65+
:widths: 35 65
66+
:header-rows: 1
67+
68+
* - *Property*
69+
- *Description*
70+
* - ``DisableRateLimitHeaders``
71+
- Determines if the ``X-Rate-Limit`` and ``Retry-After`` headers are disabled
72+
* - ``QuotaExceededMessage``
73+
- Defines the message displayed when the quota is exceeded. It is optional and the default message is informative.
74+
* - ``HttpStatusCode``
75+
- Indicates the HTTP status code returned during *rate limiting*. The default value is **429** (`Too Many Requests`_).
76+
* - ``ClientIdHeader``
77+
- Specifies the header used to identify clients, with ``ClientId`` as the default.
78+
79+
Notes
80+
"""""
81+
82+
1. Global ``RateLimitOptions`` are supported when the :ref:`sd-dynamic-routing` feature is configured with :doc:`../features/servicediscovery`.
83+
Hence, if :doc:`../features/servicediscovery` is not set up, only the options for static routes need to be defined to impose limitations at the route level.
84+
2. Global *Rate Limiting* options may not be practical because they impose limits on all routes.
85+
It's reasonable to assert that in a Microservices architecture, it's an unusual approach to apply the same limitations to all routes.
86+
Configuring per-route limiting could be a more tailored solution.
87+
Global *Rate Limiting* is logical if all routes share the same downstream hosts, thus limiting the usage of a single service.
88+
3. *Rate Limiting* is now built-in with ASP.NET Core 7, as discussed in the following topic below.
89+
Our team holds the view that the ASP.NET ``RateLimiter`` enables global limitations through its rate limiting policies.
90+
91+
Future and ASP.NET Implementation
92+
---------------------------------
6893

6994
The Ocelot team is contemplating a redesign of the *Rate Limiting* feature following the `Announcing Rate Limiting for .NET`_ by Brennan Conroy on July 13th, 2022.
7095
Currently, no decision has been made, and the previous version of the feature remains part of the `20.0`_ release for .NET 7. [#f2]_
7196

72-
Discover the new features being introduced in the ASP.NET Core 7.0 release:
97+
Discover the new features in the ASP.NET Core 7.0 release:
7398

7499
* The `RateLimiter Class <https://learn.microsoft.com/en-us/dotnet/api/system.threading.ratelimiting.ratelimiter>`_, available since ASP.NET Core 7.0
75100
* The `System.Threading.RateLimiting <https://www.nuget.org/packages/System.Threading.RateLimiting>`_ NuGet package
76101
* The `Rate limiting middleware in ASP.NET Core <https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit>`_ article by Arvin Kahbazi, Maarten Balliauw, and Rick Anderson
77102

78-
While retaining the old implementation as an Ocelot built-in feature makes sense, we plan to transition to the new Rate Limiter from the ``Microsoft.AspNetCore.RateLimiting`` namespace.
103+
While it makes sense to retain the old implementation as a built-in feature of Ocelot, we are planning to transition to the new Rate Limiter from the ``Microsoft.AspNetCore.RateLimiting`` namespace.
79104

80-
Please share your thoughts with us in the `Discussions <https://github.com/ThreeMammals/Ocelot/discussions>`_ space of the repository. |octocat|
105+
We invite you to share your thoughts with us in the `Discussions <https://github.com/ThreeMammals/Ocelot/discussions>`_ space of the repository. |octocat|
81106

82107
""""
83108

0 commit comments

Comments
 (0)