Skip to content

Bug fix - Respect root configuration fallback - #547

Merged
Zhiyuan Liang (zhiyuanliang-ms) merged 2 commits into
mainfrom
zhiyuanliang/bug-fix-4.2.0
Jul 8, 2025
Merged

Zhiyuan Liang (zhiyuanliang-ms) merged 2 commits into
mainfrom
zhiyuanliang/bug-fix-4.2.0

Conversation

@zhiyuanliang-ms

Copy link
Copy Markdown
Member

Why this PR?

Fixed a bug introduced in 4.2.0: #546

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the feature configuration fallback mechanism by ensuring that configuration sections are properly initialized only once.

  • Adds a thread-safe lazy initialization method (EnsureInit) to load configuration sections when needed.
  • Removes direct initialization of configuration sections from the constructor.

@zhiyuanliang-ms

Copy link
Copy Markdown
Member Author

Add a testcaste that fails before the fix and succeed after the fix

Comment thread tests/Tests.FeatureManagement/FeatureManagementTest.cs
Zhiyuan Liang (zhiyuanliang-ms) added a commit that referenced this pull request Jul 9, 2025
* Bug fix - Respect root configuration fallback (#547)

* use Lazy<T> to ensure lazy initialization

* use ensureinit pattern without lock

* version bump 4.2.1 (#548)
@zhiyuanliang-ms
Zhiyuan Liang (zhiyuanliang-ms) deleted the zhiyuanliang/bug-fix-4.2.0 branch November 9, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants