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

fix(feature-service/get_edge_override): handle deleted features #3368

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

gagantrivedi
Copy link
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Fixes this by skipping deleted features when calculating overrides for edge

How did you test this code?

Adds unit test

Copy link

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 10:04am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 10:04am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 10:04am

@vercel vercel bot temporarily deployed to Preview – flagsmith-frontend-staging February 2, 2024 07:43 Inactive
@github-actions github-actions bot added api Issue related to the REST API github labels Feb 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (81a5e59) 95.93% compared to head (683a570) 27.39%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3368       +/-   ##
===========================================
- Coverage   95.93%   27.39%   -68.54%     
===========================================
  Files        1071      993       -78     
  Lines       32755    28598     -4157     
===========================================
- Hits        31423     7834    -23589     
- Misses       1332    20764    +19432     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

Uffizzi Preview deployment-45664 was deleted.

Comment on lines +279 to +284
edge_identity.add_feature_override(
map_feature_state_to_engine(identity_featurestate),
)
edge_identity.add_feature_override(
map_feature_state_to_engine(distinct_identity_featurestate),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we can discuss this on the standup but I'm a little unsure on the details here. Are these overrides for 2 different features?

It's not obvious to me from the test why we're still left with one edge identity override.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's for a different feature

Copy link
Contributor

Choose a reason for hiding this comment

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

I think some comments would probably help here.

# Let's add 2 overrides for 2 separate features for the edge identity
edge_identity.add_feature_override(
    ...

# and delete one of the features
feature.delete()

@gagantrivedi gagantrivedi added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit 1eae11c Feb 2, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants