Skip to content

Commit 22bc5b6

Browse files
committed
Release 22.0 | +semver: breaking
1 parent 27a5999 commit 22bc5b6

File tree

5 files changed

+44
-23
lines changed

5 files changed

+44
-23
lines changed

ReleaseNotes.md

+30-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
## Upgrade to .NET 8 (version {0}) aka [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) release
2-
> Read article: [Announcing .NET 8](https://devblogs.microsoft.com/dotnet/announcing-dotnet-8/) by Gaurav Seth, on November 14th, 2023
1+
## October 2023 (version {0}) aka [Swiss Locomotive](https://en.wikipedia.org/wiki/SBB-CFF-FFS_Ae_6/6) release
2+
> Codenamed as **[Swiss Locomotive](https://www.google.com/search?q=swiss+locomotive)**
33
4-
### About
5-
We are pleased to announce to you that we can now offer the support of [.NET 8](https://dotnet.microsoft.com/en-us/download).
6-
But that is not all, in this release, we are adopting support of several versions of the .NET framework through [multitargeting](https://learn.microsoft.com/en-us/dotnet/standard/frameworks).
7-
The Ocelot distribution is now compatible with .NET **6**, **7** and **8**. :tada:
4+
### Focused On
5+
<details>
6+
<summary><b>Logging feature</b>. Performance review, redesign and improvements with new best practices to log</summary>
87

9-
In the future, we will try to ensure the support of the [.NET SDKs](https://dotnet.microsoft.com/en-us/download/dotnet) that are still actively maintained by the .NET team and community.
10-
Current .NET versions in support are the following: [6, 7, 8](https://dotnet.microsoft.com/en-us/download/dotnet).
8+
- Proposing a centralized `WriteLog` method for the `OcelotLogger`
9+
- Factory methods for computed strings such as `string.Format` or interpolated strings
10+
- Using `ILogger.IsEnabled` before calling the native `WriteLog` implementation and invoking string factory method
11+
</details>
12+
<details>
13+
<summary><b>Quality of Service feature</b>. Redesign and stabilization, and it produces less log records now.</summary>
14+
15+
- Fixing issue with [Polly](https://www.thepollyproject.org/) Circuit Breaker not opening after max number of retries reached
16+
- Removing useless log calls that could have an impact on performance
17+
- Polly [lib](https://www.nuget.org/packages/Polly#versions-body-tab) reference updating to latest `8.2.0` with some code improvements
18+
</details>
19+
<details>
20+
<summary>Documentation for <b>Logging</b>, <b>Request ID</b>, <b>Routing</b> and <b>Websockets</b></summary>
21+
22+
- [Logging](https://ocelot.readthedocs.io/en/latest/features/logging.html)
23+
- [Request ID](https://ocelot.readthedocs.io/en/latest/features/requestid.html)
24+
- [Routing](https://ocelot.readthedocs.io/en/latest/features/routing.html)
25+
- [Websockets](https://ocelot.readthedocs.io/en/latest/features/websockets.html)
26+
</details>
27+
<details>
28+
<summary>Testing improvements and stabilization aka <b>bug fixing</b></summary>
1129

12-
### Technical info
13-
As an ASP.NET Core app, now Ocelot targets `net6.0`, `net7.0` and `net8.0` frameworks.
14-
15-
Starting with **v{0}**, the solution's code base supports [Multitargeting](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-multitargeting-overview) as SDK-style projects.
16-
It should be easier for teams to move between (migrate to) .NET 6, 7 and 8 frameworks. Also, new features will be available for all .NET SDKs which we support via multitargeting.
17-
Find out more here: [Target frameworks in SDK-style projects](https://learn.microsoft.com/en-us/dotnet/standard/frameworks)
30+
- [Routing](https://ocelot.readthedocs.io/en/latest/features/routing.html) bug fixing: query string placeholders including **CatchAll** one aka `{{everything}}` and query string duplicates removal
31+
- [QoS](https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html) bug fixing: Polly circuit breaker exceptions
32+
- Testing bug fixing: rare failed builds because of unstable Polly tests. Acceptance common logic for ports
33+
</details>

build.cake

+6-5
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ Task("CreateReleaseNotes")
161161
var releaseHeader = string.Format(System.IO.File.ReadAllText("./ReleaseNotes.md"), releaseVersion, lastRelease);
162162
releaseNotes = new List<string> { releaseHeader };
163163

164-
var shortlogSummary = GitHelper($"shortlog --no-merges --numbered --summary {lastRelease}..HEAD");
164+
var shortlogSummary = GitHelper($"shortlog --no-merges --numbered --summary {lastRelease}..HEAD")
165+
.ToList();
165166
var re = new Regex(@"^[\s\t]*(?'commits'\d+)[\s\t]+(?'author'.*)$");
166167
var summary = shortlogSummary
167168
.Where(x => re.IsMatch(x))
@@ -207,7 +208,6 @@ Task("CreateReleaseNotes")
207208
static string HonorForDeletions(string place, string author, int commits, int files, int insertions, int deletions)
208209
=> HonorForInsertions(place, author, commits, files, insertions, $"and **{deletions}** deletion{Plural(deletions)}");
209210

210-
var statistics = new List<(string Contributor, int Files, int Insertions, int Deletions)>();
211211
foreach (var group in commitsGrouping)
212212
{
213213
if (topContributors.Count >= top3) break;
@@ -220,6 +220,7 @@ Task("CreateReleaseNotes")
220220
}
221221
else // multiple candidates with the same number of commits, so, group by files changed
222222
{
223+
var statistics = new List<(string Contributor, int Files, int Insertions, int Deletions)>();
223224
var shortstatRegex = new Regex(@"^\s*(?'files'\d+)\s+files?\s+changed(?'ins',\s+(?'insertions'\d+)\s+insertions?\(\+\))?(?'del',\s+(?'deletions'\d+)\s+deletions?\(\-\))?\s*$");
224225
// Collect statistics from git log & shortlog
225226
foreach (var author in group.authors)
@@ -315,15 +316,15 @@ private void WriteReleaseNotes()
315316
Information($"RUN {nameof(WriteReleaseNotes)} ...");
316317

317318
EnsureDirectoryExists(packagesDir);
318-
System.IO.File.WriteAllLines(releaseNotesFile, releaseNotes);
319+
System.IO.File.WriteAllLines(releaseNotesFile, releaseNotes, Encoding.UTF8);
319320

320-
var content = System.IO.File.ReadAllText(releaseNotesFile);
321+
var content = System.IO.File.ReadAllText(releaseNotesFile, Encoding.UTF8);
321322
if (string.IsNullOrEmpty(content))
322323
{
323324
System.IO.File.WriteAllText(releaseNotesFile, "No commits since last release");
324325
}
325326

326-
Information($"Release notes are >>>\n{content}<<<");
327+
Information("Release notes are >>>\n{0}<<<", content);
327328
Information($"EXITED {nameof(WriteReleaseNotes)}");
328329
}
329330

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'Ocelot'
1010
copyright = ' 2023 ThreeMammals Ocelot team'
1111
author = 'Tom Pallister, Ocelot Core team at ThreeMammals'
12-
release = '21.0'
12+
release = '22.0'
1313

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

docs/features/logging.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Every log record has these 2 properties:
2424
As an ``IOcelotLogger`` interface object being injected to constructors of service classes, current default Ocelot logger (``OcelotLogger`` class) reads these 2 properties from the ``IRequestScopedDataRepository`` interface object.
2525
Find out more about these properties and other details on the *Request ID* logging feature in the :doc:`../features/requestid` chapter.
2626

27+
.. _logging-warning:
28+
2729
Warning
2830
-------
2931

@@ -34,7 +36,9 @@ The team has had so many issues about performance issues with Ocelot and it is a
3436
* Use ``Error`` and ``Critical`` levels in production environment!
3537
* Use ``Warning`` level in testing & staging environments!
3638

37-
These and other recommendations are below in the `Best Practices <#best-practices>`_ section.
39+
These and other recommendations are below in the :ref:`logging-best-practices` section.
40+
41+
.. _logging-best-practices:
3842

3943
Best Practices
4044
--------------
@@ -88,7 +92,7 @@ Second
8892
^^^^^^
8993

9094
Ensure proper usage of minimum logging level for each environment: development, testing, production, etc.
91-
So, once again, read important notes of the `Warning <#warning>`_ section!
95+
So, once again, read important notes of the :ref:`logging-warning` section!
9296

9397
Third
9498
^^^^^

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome to Ocelot 21.0
1+
Welcome to Ocelot 22.0
22
======================
33

44
Thanks for taking a look at the Ocelot documentation! Please use the left hand navigation to get around.

0 commit comments

Comments
 (0)