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

chore(hybrid-cloud): Mark react page view as control test stable #54257

Closed
wants to merge 11 commits into from

Conversation

dashed
Copy link
Member

@dashed dashed commented Aug 5, 2023

  1. Delegates first_event_pending signal to organization_service.schedule_signal().
  2. Tests pass in split database mode with SENTRY_USE_SPLIT_DBS=1

@dashed dashed requested a review from a team August 5, 2023 00:40
@dashed dashed self-assigned this Aug 5, 2023
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 5, 2023
organization=organization, slug=kwargs["project_id"]
).first()
first_event_pending.send(project=project, user=request.user, sender=self)
project = project_service.get_by_slug(
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like projects already belong to the organization object. I don't think it is necessary to query the project again by slug, a simple filter on the objects inside organization should be sufficient?

organization_service.schedule_signal(
signal=first_event_pending,
organization_id=organization.id,
args=dict(project=project, user_id=request.user.id if request.user else None),
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, I'm not a fan of serializing the entire project object here either. What about just passing the project_id in instead and querying the project on the other side? Should be possible to change the handler.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with changing the signal handler if we need to make this signal cross-region.

follow=True,
)
with assume_test_silo_mode(SiloMode.REGION):
response = self.client.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to add outbox_runner and receivers_raise_on_send context handlers here to validate and test the actual signal being executed.

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #54257 (daedb54) into master (295c12d) will increase coverage by 0.05%.
Report is 6 commits behind head on master.
The diff coverage is 63.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #54257      +/-   ##
==========================================
+ Coverage   79.68%   79.74%   +0.05%     
==========================================
  Files        4989     4989              
  Lines      211739   211742       +3     
  Branches    36090    36093       +3     
==========================================
+ Hits       168719   168844     +125     
+ Misses      37833    37698     -135     
- Partials     5187     5200      +13     
Files Changed Coverage Δ
.../sentry/services/hybrid_cloud/organization/impl.py 79.83% <0.00%> (-0.65%) ⬇️
src/sentry/web/urls.py 92.30% <ø> (ø)
src/sentry/web/frontend/react_page.py 94.28% <66.66%> (+1.42%) ⬆️
src/sentry/receivers/onboarding.py 82.14% <100.00%> (ø)
...sentry/services/hybrid_cloud/organization/model.py 88.27% <100.00%> (+0.07%) ⬆️

... and 7 files with indirect coverage changes

).first()
first_event_pending.send(project=project, user=request.user, sender=self)
def handle(self, request: Request, organization: RpcOrganization, **kwargs) -> HttpResponse:
if "project_slug" in kwargs and "onboarding" in request.GET:
Copy link
Member

Choose a reason for hiding this comment

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

Is onboarding ever a falsey value? Previously the logic would not pass for falsey values of onboarding but now it will.

Comment on lines +111 to +113
project = next(
(p for p in organization.projects if p.slug == kwargs["project_slug"]), None
)
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it could be expensive. Having RpcOrganization inline all of the projects could be a huge payload as some orgs have 1000s of projects. Could we adapt the signal to pass the project slug instead? The project slug is unlikely to shift under us during onboarding and even if it does the impact of that is very low.

@getsantry
Copy link
Contributor

getsantry bot commented Oct 19, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Oct 19, 2023
@getsantry getsantry bot closed this Oct 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2023
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 Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants