Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Identity overrides in local evaluation mode #34

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

khvn26
Copy link
Member

@khvn26 khvn26 commented Apr 5, 2024

Contributes to Flagsmith/flagsmith#3132.

  • Add Environment.identity_overrides, remove integrations config attributes
  • Rename Identity.flags to Identity.identity_features
  • Store identity overrides by identifier
  • Use stored identities when evaluating identity flags
  • Use a JSON file fixture for tests
  • Bump version

@khvn26 khvn26 requested review from a team and gagantrivedi and removed request for a team April 5, 2024 18:23
@khvn26 khvn26 force-pushed the feat/identities-in-local-eval branch from 2d7b95d to 2bcbf2c Compare April 5, 2024 18:24
khvn26 added 2 commits April 6, 2024 15:10
- Rename `Identity.flags` to `Identity.identity_features`
- Store identity overrides by identifier
- Use stored identities when evaluating identity flags
- Use a JSON file fixture for tests
@khvn26 khvn26 force-pushed the feat/identities-in-local-eval branch from 239aec5 to e9be609 Compare April 6, 2024 14:11
@@ -12,7 +12,7 @@ defmodule Flagsmith.Schemas.Identity do
field(:django_id, :integer)
field(:identifier, :string)
field(:environment_key, :string)
embeds_many(:flags, Flagsmith.Schemas.Features.FeatureState)
Copy link
Member

Choose a reason for hiding this comment

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

Is this a public attribute (if such a thing exists in Elixir)? If so, should we increment its major version?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not private, but the model itself is not meant to be used directly.

Copy link
Member

@gagantrivedi gagantrivedi left a comment

Choose a reason for hiding this comment

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

I have added a comment, but it looks good to me (from what little I could understand).

@khvn26 khvn26 merged commit d10e496 into main Apr 9, 2024
1 check passed
@khvn26 khvn26 deleted the feat/identities-in-local-eval branch April 9, 2024 10:56
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.

2 participants