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.3.6 | v23.3.4 Hotfixes | October'24 release | +semver: patch #2185

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

@raman-m raman-m added release Pre/Release (minor, major) hotfix Gitflow: Hotfix issue, PR related to hotfix branch Oct'24 October 2024 release labels Oct 26, 2024
@raman-m raman-m added this to the October'24 milestone Oct 26, 2024
@raman-m raman-m self-assigned this Oct 26, 2024
@raman-m
Copy link
Member Author

raman-m commented Oct 28, 2024

Release Notes

🔥 Hot fixing v23.3.4 (version 24.1.0-raman-m-23-3-6-0001) aka October'24 release

Read the Docs: Ocelot 23.3
Hot fixed version: 23.3.4
Milestone: October'24

❤️ A heartfelt "Thank You" to Nikolai Masson and Nikolay Kuksov for their contributions!

ℹ️ About

This release provides minor bug fixes from the previous 23.3.4 release. All bugs have been addressed in the October'24 milestone.

📓 For projects utilizing the Service Discovery feature, it is recommended to update to this version to benefit from the unstable release 23.3.4, which includes fixes for both Consul and Kube discovery providers.

🧑‍💻 Technical Information

The Ocelot solution encountered a significant issue with the disabled scope validation of services in the DI-container, affecting both testing projects and the core library. Initially, this was not problematic when services were designed as singletons by previous contributors and our team. However, with the introduction of more scoped services by the Ocelot team, it became clear that our testing projects could not adequately handle them.
This patch introduces scope validation across all domains: unit tests, acceptance tests, and the core library itself. We advise always enabling scope validation in your custom Ocelot solutions, especially when dealing with numerous C# overridden classes in the DI-container and any attached custom functionality.

The patch enhances functionality for two primary Service Discovery providers:

  • The Ocelot.Provider.Consul provider. The addressed bug is issue In v23.3.4 ConsulProviderFactory can't resolve IConsulServiceBuilder via IServiceProvider #2178, reported on October 17, 2024.
    The System.InvalidOperationException error stating "Cannot resolve scoped service 'Ocelot.Provider.Consul.Interfaces.IConsulServiceBuilder' from root provider" has been resolved.
    To clarify, the IConsulServiceBuilder service is a scoped service in DI, injected via the AddConsul() or AddConsul<T>() methods. Therefore, the DefaultConsulServiceBuilder should also be a scoped service, with HttpContext injected to meet your development requirements.
  • The Ocelot.Provider.Kubernetes provider had an issue reported as Cannot resolve scoped service KubeClient.IKubeApiClient from root provider #977 on August 1, 2019.
    It involved a System.InvalidOperationException with the message: "Cannot resolve scoped service 'KubeClient.IKubeApiClient' from root provider." This "invalid scopes" error occurred only in development mode, as release mode DLLs do not validate scopes. However, the KubeApiClient is designed to have a scoped lifetime. Acceptance tests passed because scope validation was disabled, and the KubeClient was replaced with a singleton. This inconsistency was identified and reproduced by the old 977 issue. As a temporary solution, the IKubeApiClient was registered as a singleton.
    Looking ahead, our team intends to redesign the Kubernetes provider to have a default service builder that is scoped, similar to the Consul provider.

❗ Breaking Changes

Upgrading from 23.3.4 to 24.1.0-raman-m-23-3-6-0001 introduces no breaking changes. However, upgrading from 23.3.0 or earlier versions may result in some incompatibilities. For further information, please refer to the release notes of v23.3.4.

Starring ⭐ aka Release Influencers :bowtie:

⭐⭐ Raman Maksimchuk
⭐ Henrique Holtz
⭐ Nikolai Masson
⭐ Nikolay
⭐ dependabot[bot]

@raman-m raman-m merged commit db930d4 into release/23.3 Oct 31, 2024
1 check passed
@raman-m raman-m deleted the raman-m/23.3.6 branch October 31, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix Gitflow: Hotfix issue, PR related to hotfix branch Oct'24 October 2024 release release Pre/Release (minor, major)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant