Repository navigation
Conversation
Features with a created_at after 2026-10-15 UTC hash their name into the rollout id, so two flags at the same rollout reach different organizations. Older flags, and flags whose created_at is missing or does not parse, keep the identity-only id so in-flight partial rollouts do not move. This mirrors the sentry-options evaluator, which is what production uses, so flagpole_eval.py reports the same bucket. Refs VDY-161
Python's datetime drops digits past microseconds, so 2026-10-15T00:00:00.000000001 keeps identity-only bucketing. sentry-options now truncates the same way; add the case to both parity tables so they stay in step. Refs VDY-161
test_bucket_id now pins organization_id 123 under two real feature names instead of foo:bar under placeholder names, and the two rollout bucketing tests use the same context and assert their own bucket numbers in place. The sentry-options rust client pins the same input and numbers. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep the original ID generator and add an optional feature-name prefix. Remove the extra identity-string cache and hashing helper. Preserve existing IDs and rollout buckets. Refs VDY-161
Write the feature name and its separator to the hasher in a single call. The digest is unchanged.
kenzoengineer
left a comment
There was a problem hiding this comment.
I've finished cutting over flagpole functionality to the new system already 🎉 ! You can close this PR, there isn't any need to edit anything in getsentry or sentry.
From now on, bucketing, conditions, etc. flagpole changes only live in sentry-options. Anything that should be sentry/getsentry specific after evaluation can still live in getsentry/sentry.
in summary, we only need getsentry/sentry-options#184, can close this.
@kenzoengineer Thanks, looks like there is a debug tool that still uses the old python evaluator in this repo, so without an update, its results can differ from production for new flags after the cutoff. Should we change that script to use sentry-options, or remove it? |
good catch, i'd remove it because it doesn't seem to be called by anything (except it's own tests) and i was eventually going to delete it anyways as part of migration cleanup. The tool does seem useful tho, I would be happy to add that to the sentry-options-cli natively |
Percentage rollouts currently select the same organizations for different features when the rollout percentage and conditions match. This change adds the feature name to the rollout hash, so new features can select different groups.
The cutoff is October 5, 2026, at 00:00:00 UTC:
created_atalso keep the existing calculation.Existing partial rollouts therefore keep the same organizations.
This PR updates Python's
flagpolepackage to match getsentry/sentry-options#184. Production uses thesentry-optionsevaluator (getsentry/getsentry#21872). Matching its behavior keepsflagpole_eval.pyresults consistent with production. The Python and Rust tests check the same expected bucket values.Deployment requirement: Both packages must use the same cutoff. Deploy the changes before that time. If deployment is delayed, move both cutoff constants to the same later date.
Refs VDY-161