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.2.1 #2029

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 3 additions & 53 deletions ReleaseNotes.md
@@ -1,54 +1,4 @@
## February 2024 (version {0}) aka [Lunar Eclipse](https://www.timeanddate.com/eclipse/lunar/2024-march-25) release
> Codenamed: **[Lunar Eclipse](https://www.bing.com/search?q=Lunar+Eclipse+2024)**
> Read the Docs: [Ocelot 23.2](https://ocelot.readthedocs.io/en/23.2.0/)
## Documentation patch (version {0}) for [{1}](https://github.com/ThreeMammals/Ocelot/releases/tag/{1}) release
> Read the Docs: [Ocelot 23.2](https://ocelot.readthedocs.io/en/{0}/)

### What's new?

- **[Configuration](https://ocelot.readthedocs.io/en/latest/features/configuration.html)**: A brand new [Merging files to memory](https://ocelot.readthedocs.io/en/23.2.0/features/configuration.html#merging-files-to-memory) by @ebjornset as a part of the [Merging Configuration Files](https://ocelot.readthedocs.io/en/23.2.0/features/configuration.html#merging-configuration-files) feature.
The `AddOcelot` method merges the **ocelot.*.json** files into a single **ocelot.json** file as the primary configuration file, which is written back to disk and then added to the `IConfigurationBuilder` for the well-known `IConfiguration`. You can now call another `AddOcelot` method that adds the merged JSON directly from memory to the `IConfigurationBuilder`, using `AddJsonStream` instead.
See more details in [Configuration Overview](https://ocelot.readthedocs.io/en/23.2.0/features/dependencyinjection.html#configuration-overview) of [Dependency Injection](https://ocelot.readthedocs.io/en/23.2.0/features/dependencyinjection.html).
- **[Service Fabric](https://ocelot.readthedocs.io/en/latest/features/servicefabric.html)**: Published old undocumented "[Placeholders in Service Name](https://ocelot.readthedocs.io/en/23.2.0/features/servicefabric.html#placeholders-in-service-name)" feature of [Service Fabric](https://ocelot.readthedocs.io/en/23.2.0/features/servicefabric.html) [service discovery provider](https://ocelot.readthedocs.io/en/23.2.0/search.html?q=ServiceDiscoveryProvider).
This feature by @FelixBoers is available starting from version [13.0.0](https://github.com/ThreeMammals/Ocelot/releases/tag/13.0.0).
- **[Quality of Service](https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html)**: A brand new [Polly](https://github.com/App-vNext/Polly) v8 pipelines [Extensibility](https://ocelot.readthedocs.io/en/23.2.0/features/qualityofservice.html#extensibility) feature by @RaynaldM

### Focus On

<details>
<summary><b>Updates of the features</b>: Configuration, Dependency Injection and QoS</summary>

- [Configuration](https://ocelot.readthedocs.io/en/latest/features/configuration.html): New [Merging files to memory](https://ocelot.readthedocs.io/en/23.2.0/features/configuration.html#merging-files-to-memory) feature by @ebjornset
- [Dependency Injection](https://ocelot.readthedocs.io/en/latest/features/dependencyinjection.html): Added new overloaded [AddOcelot methods](https://ocelot.readthedocs.io/en/23.2.0/features/dependencyinjection.html#addocelot-method) by @ebjornset
- [Quality of Service](https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html): Support of new [Polly](https://github.com/App-vNext/Polly) v8 syntax and new [Extensibility](https://ocelot.readthedocs.io/en/23.2.0/features/qualityofservice.html#extensibility) feature by @RaynaldM
</details>

<details>
<summary><b>Ocelot extra packages</b></summary>

- [Ocelot.Provider.Polly](https://www.nuget.org/packages/Ocelot.Provider.Polly): Support of new [Polly](https://github.com/App-vNext/Polly) v8 syntax.
*Polly* [8.0+](https://github.com/App-vNext/Polly/releases) versions introduced the concept of [resilience pipelines](https://www.pollydocs.org/pipelines/).
All [AddPolly extensions](https://github.com/ThreeMammals/Ocelot/blob/develop/src/Ocelot.Provider.Polly/OcelotBuilderExtensions.cs) have been automatically migrated from **v7** to **v8**.
Please note that older **v7** extensions are marked with the `[Obsolete]` attribute and renamed using the `V7` suffix. And the old **v7** implementation has been moved to the [v7 namespace](https://github.com/ThreeMammals/Ocelot/tree/develop/src/Ocelot.Provider.Polly/v7).
See more details in [Polly v7 vs v8](https://ocelot.readthedocs.io/en/23.2.0/features/qualityofservice.html#polly-v7-vs-v8) section of [Quality of Service](https://ocelot.readthedocs.io/en/23.2.0/features/qualityofservice.html) chapter.
</details>

<details>
<summary><b>Stabilization</b> aka bug fixing</summary>

- [683](https://github.com/ThreeMammals/Ocelot/issues/683) by PR [1927](https://github.com/ThreeMammals/Ocelot/pull/1927)
[New rules](https://github.com/search?q=repo%3AThreeMammals%2FOcelot+IsPlaceholderNotDuplicatedIn+IsUpstreamPlaceholderDefinedInDownstream+IsDownstreamPlaceholderDefinedInUpstream&type=code) have been added to Ocelot's configuration validation logic to find duplicate placeholders in path templates.
See more in the [FileConfigurationFluentValidator](https://github.com/search?q=repo%3AThreeMammals%2FOcelot%20FileConfigurationFluentValidator&type=code) class. Thanks to @AlyHKafoury!
- [1518](https://github.com/ThreeMammals/Ocelot/issues/1518) hotfix by PR [1986](https://github.com/ThreeMammals/Ocelot/pull/1986)
Using the default `IServiceCollection` [DI extensions](https://github.com/ThreeMammals/Ocelot/blob/develop/src/Ocelot/DependencyInjection/ServiceCollectionExtensions.cs) to register Ocelot services resulted in the `ServiceCollection` provider being forced to be created by calling `BuildServiceProvider()`.
This resulted in problems with dependency injection libraries, or worse, causing the Ocelot app to crash!
See more in the [ServiceCollectionExtensions](https://github.com/search?q=repo%3AThreeMammals%2FOcelot+ServiceCollectionExtensions&type=code) class. Thanks to @ArwynFr!
- See [all bugs](https://github.com/ThreeMammals/Ocelot/issues?q=is%3Aissue+is%3Aclosed+label%3Abug+milestone%3AFebruary%2724) of the [February'24](https://github.com/ThreeMammals/Ocelot/milestone/5) milestone
</details>

<details>
<summary><b>Documentation</b> for version <a href="https://ocelot.readthedocs.io/en/23.2.0/">23.2</a></summary>

- [Configuration](https://ocelot.readthedocs.io/en/23.2.0/features/configuration.html)
- [Dependency Injection](https://ocelot.readthedocs.io/en/23.2.0/features/dependencyinjection.html)
- [Quality of Service](https://ocelot.readthedocs.io/en/23.2.0/features/qualityofservice.html)
- [Service Fabric](https://ocelot.readthedocs.io/en/23.2.0/features/servicefabric.html)
</details>
This is a technical release: no other information.
45 changes: 32 additions & 13 deletions build.cake
Expand Up @@ -56,6 +56,7 @@ var nugetFeedStableSymbolsUploadUrl = "https://www.nuget.org/api/v2/package";
string committedVersion = "0.0.0-dev";
GitVersion versioning = null;
int releaseId = 0;
bool IsTechnicalRelease = true;
string gitHubUsername = "TomPallister";
string gitHubPassword = Environment.GetEnvironmentVariable("OCELOT_GITHUB_API_KEY");

Expand Down Expand Up @@ -83,7 +84,7 @@ Task("RunTests")
.IsDependentOn("RunIntegrationTests");

Task("Release")
.IsDependentOn("Build")
//.IsDependentOn("Build")
.IsDependentOn("CreateReleaseNotes")
.IsDependentOn("CreateArtifacts")
.IsDependentOn("PublishGitHubRelease")
Expand Down Expand Up @@ -154,12 +155,18 @@ Task("CreateReleaseNotes")

var lastReleaseTags = GitHelper("describe --tags --abbrev=0 --exclude net*");
var lastRelease = lastReleaseTags.First(t => !t.StartsWith("net")); // skip 'net*-vX.Y.Z' tag and take 'major.minor.build'
Information("Last release tag is " + lastRelease);

var releaseVersion = versioning.NuGetVersion;

// Read main header from Git file, substitute version in header, and add content further...
Information("{0} New release tag is " + releaseVersion);
Information("{1} Last release tag is " + lastRelease);
var releaseHeader = string.Format(System.IO.File.ReadAllText("./ReleaseNotes.md"), releaseVersion, lastRelease);
releaseNotes = new List<string> { releaseHeader };
if (IsTechnicalRelease)
{
WriteReleaseNotes();
return;
}

var shortlogSummary = GitHelper($"shortlog --no-merges --numbered --summary {lastRelease}..HEAD")
.ToList();
Expand Down Expand Up @@ -298,6 +305,7 @@ Task("CreateReleaseNotes")
}
}
} // END of Top 3

releaseNotes.Add("### Honoring :medal_sports: aka Top Contributors :clap:");
releaseNotes.AddRange(topContributors);
releaseNotes.Add("");
Expand Down Expand Up @@ -415,20 +423,23 @@ Task("RunIntegrationTests")

Task("CreateArtifacts")
.IsDependentOn("CreateReleaseNotes")
.IsDependentOn("Compile")
.Does(() =>
//.IsDependentOn("Compile")
.Does(() =>
{
WriteReleaseNotes();
System.IO.File.AppendAllLines(artifactsFile, new[] { "ReleaseNotes.md" });

CopyFiles("./src/**/Release/Ocelot.*.nupkg", packagesDir);
var projectFiles = GetFiles("./src/**/Release/Ocelot.*.nupkg");
foreach(var projectFile in projectFiles)
if (!IsTechnicalRelease)
{
System.IO.File.AppendAllLines(
artifactsFile,
new[] { projectFile.GetFilename().FullPath }
);
CopyFiles("./src/**/Release/Ocelot.*.nupkg", packagesDir);
var projectFiles = GetFiles("./src/**/Release/Ocelot.*.nupkg");
foreach(var projectFile in projectFiles)
{
System.IO.File.AppendAllLines(
artifactsFile,
new[] { projectFile.GetFilename().FullPath }
);
}
}

var artifacts = System.IO.File.ReadAllLines(artifactsFile)
Expand Down Expand Up @@ -511,13 +522,21 @@ Task("PublishToNuget")
.IsDependentOn("DownloadGitHubReleaseArtifacts")
.Does(() =>
{
Information("Skipping of publishing to NuGet...");
if (IsTechnicalRelease)
{
Information("Skipping of publishing to NuGet because of technical release...");
return;
}

if (IsRunningOnCircleCI())
{
Information("Publish to NuGet...");
PublishPackages(packagesDir, artifactsFile, nugetFeedStableKey, nugetFeedStableUploadUrl, nugetFeedStableSymbolsUploadUrl);
}
});

Task("Void").Does(() => {});

RunTarget(target);

private void GenerateReport(Cake.Core.IO.FilePath coverageSummaryFile)
Expand Down