Skip to content

Conversation

@iamrajjoshi
Copy link
Collaborator

Followup on #71668

I refactored the serializers here so they accept a new kwarg - include_feature_flag. if the kwarg is passed, it will only determine the features field if the flag is True.

This should reduce the amount of computation that we do if the response doesn't require feature flags.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 30, 2024
from sentry import experiments

experiment_assignments = experiments.all(org=obj, actor=user)
include_feature_flags = kwargs.get("include_feature_flags", True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should include the flag if the kwarg isn't passed in.

@iamrajjoshi iamrajjoshi requested review from a team May 30, 2024 21:41
@iamrajjoshi iamrajjoshi self-assigned this May 30, 2024
@iamrajjoshi iamrajjoshi marked this pull request as ready for review May 30, 2024 21:42
@codecov
Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 77.90%. Comparing base (23412d5) to head (cfec503).
Report is 9 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #71791       +/-   ##
===========================================
+ Coverage   56.83%   77.90%   +21.07%     
===========================================
  Files        6545     6554        +9     
  Lines      291881   292194      +313     
  Branches    50423    50473       +50     
===========================================
+ Hits       165897   227642    +61745     
+ Misses     121231    58299    -62932     
- Partials     4753     6253     +1500     
Files Coverage Δ
src/sentry/api/endpoints/organization_details.py 86.90% <100.00%> (+49.99%) ⬆️
src/sentry/api/serializers/models/organization.py 95.63% <79.16%> (+27.72%) ⬆️

... and 1970 files with indirect coverage changes

Copy link
Contributor

@ykamo001 ykamo001 left a comment

Choose a reason for hiding this comment

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

Love the work here @iamrajjoshi! I think we can clean this up a little and make it more modular and easier to extend for the future, going to put some time on the calendar

@ykamo001
Copy link
Contributor

Love the work here @iamrajjoshi! I think we can clean this up a little and make it more modular and easier to extend for the future, going to put some time on the calendar

We can do this in a follow up, so no rush!

@iamrajjoshi iamrajjoshi merged commit b780446 into master Jun 3, 2024
@iamrajjoshi iamrajjoshi deleted the raj/ref/org-detail-ff-handling branch June 3, 2024 17:54
@sentry
Copy link

sentry bot commented Jun 6, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ RpcRemoteException: user.serialize_many: RPC failed, max retries reached. /api/0/organizations/{organization_id_or_slug}/ View Issue
  • ‼️ RpcRemoteException: user.serialize_many: RPC failed, max retries reached. /api/0/organizations/{organization_id_or_slug}/ View Issue
  • ‼️ RpcRemoteException: auth.get_org_auth_config: RPC failed, max retries reached. /api/0/organizations/{organization_id_or_slug}/ View Issue

Did you find this useful? React with a 👍 or 👎

markstory added a commit that referenced this pull request Jun 18, 2024
When an organization changes their slug we should redirect to the new
slug. This isn't working currently because of changes to
OrganizationDetails that elide `features` by default. (#71791)

As customer-domains will soon be retried and replaced with a system
configuration feature flag, I've chosen to adapt the logic for org
details settings to read from `ConfigStore` like it will in the future.

Fixes HC-1096
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants