From baca711622ada0a9736be63bda5144c028607885 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Thu, 13 Aug 2026 10:47:58 -0300 Subject: [PATCH] god bless the unlucky ones --- api/app/settings/common.py | 3 +++ api/tests/unit/segments/test_unit_segments_views.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/api/app/settings/common.py b/api/app/settings/common.py index 2631bd42c759..16e3eb4e7d4e 100644 --- a/api/app/settings/common.py +++ b/api/app/settings/common.py @@ -1425,11 +1425,13 @@ "FEATURE_VALUE_LIMIT must be between 0 and 2,000,000 (2MB)." ) +# TODO: Delete as per https://github.com/Flagsmith/flagsmith/issues/7818 SEGMENT_RULES_CONDITIONS_LIMIT = env.int("SEGMENT_RULES_CONDITIONS_LIMIT", 100) # These settings are to handle large datasets / odd behaviour where rules and conditions # often aren't returned in the order that they were created in, which the code implicitly # expects. +# TODO: Delete as per https://github.com/Flagsmith/flagsmith/issues/7818 SEGMENT_RULES_CONDITIONS_EXPLICIT_ORDERING_ENABLED = env.bool( "SEGMENT_RULES_CONDITIONS_EXPLICIT_ORDERING_ENABLED", default=False ) @@ -1437,6 +1439,7 @@ # In SaaS, we need to be able to split out rules and conditions # (since the ordering issue has been evident on rules for longer, and # only recently happened to conditions). +# TODO: Delete as per https://github.com/Flagsmith/flagsmith/issues/7818 SEGMENT_CONDITIONS_EXPLICIT_ORDERING_ENABLED = env.bool( "SEGMENT_CONDITIONS_EXPLICIT_ORDERING_ENABLED", default=SEGMENT_RULES_CONDITIONS_EXPLICIT_ORDERING_ENABLED, diff --git a/api/tests/unit/segments/test_unit_segments_views.py b/api/tests/unit/segments/test_unit_segments_views.py index 85adde8cd9e5..9be6e42292f7 100644 --- a/api/tests/unit/segments/test_unit_segments_views.py +++ b/api/tests/unit/segments/test_unit_segments_views.py @@ -1997,8 +1997,10 @@ def test_update_segment__whitelisted_segment_exceeds_max_conditions__returns_200 mocker: MockerFixture, project: Project, segment: Segment, + settings: SettingsWrapper, ) -> None: # Given + settings.SEGMENT_CONDITIONS_EXPLICIT_ORDERING_ENABLED = True WhitelistedSegment.objects.create(segment=segment) timestamp = "2099-01-01T00:00:00Z" over_limit_rule: SegmentRuleType = {