Skip to content

Conversation

@nunogois
Copy link
Member

https://linear.app/unleash/issue/2-3542/feature-toggles-not-updating-for-yousician-incident

This patch fixes a bug in the feature loader where a RuntimeError: dictionary changed size during iteration could occur if feature_toggles was mutated while iterating over its keys.

The fix wraps the iteration in list(...) to safely snapshot the keys before the loop begins, preventing any potential crash.

This PR is based on a new v5 branch created from the v5.12.3 tag to support patch releases for the 5.x line.

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-project-automation github-project-automation bot moved this from New to Approved PRs in Issues and PRs Apr 24, 2025
@nunogois nunogois merged commit 39c2a51 into v5 Apr 24, 2025
39 checks passed
@nunogois nunogois deleted the fix-feature-toggle-keys-iteration branch April 24, 2025 14:34
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Issues and PRs Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants