Skip to content

pkg/settings: fix SettingMap.GetOrDefault#1730

Merged
jmank88 merged 1 commit intomainfrom
chains-allowed-fix
Dec 10, 2025
Merged

pkg/settings: fix SettingMap.GetOrDefault#1730
jmank88 merged 1 commit intomainfrom
chains-allowed-fix

Conversation

@jmank88
Copy link
Contributor

@jmank88 jmank88 commented Dec 10, 2025

@jmank88 jmank88 requested a review from a team as a code owner December 10, 2025 19:53
@jmank88 jmank88 marked this pull request as draft December 10, 2025 19:53
@github-actions
Copy link

👋 jmank88, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link

github-actions bot commented Dec 10, 2025

✅ API Diff Results - No breaking changes


📄 View full apidiff report

}
if g == nil {
//TODO confirm via test
valueOrDefault := func() (T, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic was only applied when the SettingsGetter was nil, but even if DefaultGetter is nil (like our tests), core wraps it in an AtomicSettings getter, so it was bypassed. Instead we need to apply it in every default case.

@jmank88 jmank88 marked this pull request as ready for review December 10, 2025 21:08
@jmank88 jmank88 requested a review from bolekk December 10, 2025 21:08
@jmank88 jmank88 enabled auto-merge December 10, 2025 21:14
@jmank88 jmank88 added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit 4659b78 Dec 10, 2025
35 of 36 checks passed
@jmank88 jmank88 deleted the chains-allowed-fix branch December 10, 2025 22:57
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