Skip to content

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Oct 23, 2025

  • Removed FeatureContext.feature_key and use FeatureContext.name for override matching
  • Removed SegmentResult.key
  • Harmonized FeatureMetadata.flagsmithId to FeatureMetadata.flagsmith_id
  • Used Generic for segments to require metadata.flagsmith_id
  • Re-organized evaluation/models.ts

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner October 23, 2025 14:42
@Zaimwa9 Zaimwa9 requested review from emyller and removed request for a team October 23, 2025 14:42
.gitmodules Outdated
path = tests/engine/engine-tests/engine-test-data
url = git@github.com:Flagsmith/engine-test-data.git
branch = v2.5.0
branch = feat/remove-feature-key-fields
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: remove once merged

package.json Outdated
Comment on lines 61 to 62
"generate-evaluation-result-types": "curl -o evaluation-result.json https://raw.githubusercontent.com/Flagsmith/flagsmith/chore%2Fevaluation-context0key/sdk/evaluation-result.json && npx json2ts -i evaluation-result.json -o flagsmith-engine/evaluation/evaluationResult/evaluationResult.types.ts && rm evaluation-result.json",
"generate-evaluation-context-types": "curl -o evaluation-context.json https://raw.githubusercontent.com/Flagsmith/flagsmith/chore%2Fevaluation-context0key/sdk/evaluation-context.json && npx json2ts -i evaluation-context.json -o flagsmith-engine/evaluation/evaluationContext/evaluationContext.types.ts && rm evaluation-context.json",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: revert once merged

@Zaimwa9 Zaimwa9 requested a review from gagantrivedi October 23, 2025 16:04
sdk/models.ts Outdated
if (!flagsmithId) {
const flagsmith_id = flag.metadata?.flagsmith_id;
if (!flagsmith_id) {
continue;
Copy link
Member

Choose a reason for hiding this comment

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

Should we skip returning the feature if it doesn’t have an ID?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes that's what we are doing, as the continue skips adding it to the map

Copy link
Member

@gagantrivedi gagantrivedi Oct 24, 2025

Choose a reason for hiding this comment

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

No, I am saying, why should we do that? The metadata/ID being none is likely a bug?

Copy link
Member

Choose a reason for hiding this comment

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

Python SDK is throwing an error in that case.

@Zaimwa9 Zaimwa9 requested a review from gagantrivedi October 24, 2025 09:25
@Zaimwa9 Zaimwa9 requested a review from khvn26 October 27, 2025 12:31
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