Skip to content

Commit bf67ab5

Browse files
fix: First evaluation never reported for environments with compressed documents (#8323)
Co-authored-by: flagsmith-engineering[bot] <flagsmith-engineering[bot]@users.noreply.github.com>
1 parent b563f09 commit bf67ab5

5 files changed

Lines changed: 56 additions & 5 deletions

File tree

api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ dependencies = [
7676
"hubspot-api-client>=12.0.0,<13.0.0",
7777
"djangorestframework-dataclasses>=1.3.1,<2.0.0",
7878
"pyotp>=2.9.0,<3.0.0",
79-
"flagsmith-common[common-core,flagsmith-schemas,task-processor]>=3.12.1,<4",
79+
"flagsmith-common[common-core,flagsmith-schemas,task-processor]>=3.13.1,<4",
8080
"django-stubs>=5.1.3,<6.0.0",
8181
"tzdata>=2024.1,<2025.0.0",
8282
"djangorestframework-simplejwt>=5.5.1,<6.0.0",

api/tests/unit/util/mappers/test_unit_mappers_dynamodb.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,19 @@ def test_map_environment_to_compressed_environment_document__valid_environment__
334334
)
335335

336336

337+
def test_map_environment_to_compressed_environment_document__not_evaluated__onboarding_pending_retained(
338+
environment: "Environment",
339+
) -> None:
340+
# Given
341+
assert environment.first_evaluated_at is None
342+
343+
# When
344+
result = dynamodb.map_environment_to_compressed_environment_document(environment)
345+
346+
# Then
347+
assert result.document["onboarding_pending"] is True
348+
349+
337350
def test_map_environment_to_compressed_environment_document__mv_option_with_key__key_preserved(
338351
environment: "Environment",
339352
multivariate_feature: "Feature",

api/uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8847,6 +8847,12 @@ paths:
88478847
- type: integer
88488848
- type: boolean
88498849
- type: string
8850+
variant:
8851+
type: string
8852+
nullable: true
8853+
reason:
8854+
type: string
8855+
nullable: true
88508856
required:
88518857
- enabled
88528858
- feature
@@ -8941,6 +8947,12 @@ paths:
89418947
- type: integer
89428948
- type: boolean
89438949
- type: string
8950+
variant:
8951+
type: string
8952+
nullable: true
8953+
reason:
8954+
type: string
8955+
nullable: true
89448956
required:
89458957
- enabled
89468958
- feature
@@ -28742,6 +28754,16 @@ components:
2874228754
- type: string
2874328755
- type: 'null'
2874428756
title: Feature State Value
28757+
variant:
28758+
anyOf:
28759+
- type: string
28760+
- type: 'null'
28761+
title: Variant
28762+
reason:
28763+
anyOf:
28764+
- type: string
28765+
- type: 'null'
28766+
title: Reason
2874528767
required:
2874628768
- feature
2874728769
- enabled

sdk/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ paths:
8686
- type: integer
8787
- type: boolean
8888
- type: string
89+
variant:
90+
type: string
91+
nullable: true
92+
reason:
93+
type: string
94+
nullable: true
8995
required:
9096
- enabled
9197
- feature
@@ -539,6 +545,16 @@ components:
539545
- type: string
540546
- type: 'null'
541547
title: Feature State Value
548+
variant:
549+
anyOf:
550+
- type: string
551+
- type: 'null'
552+
title: Variant
553+
reason:
554+
anyOf:
555+
- type: string
556+
- type: 'null'
557+
title: Reason
542558
required:
543559
- feature
544560
- enabled

0 commit comments

Comments
 (0)