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(relay): Forward /api/0/relays/* to inner relays #3144

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented Jun 19, 2024

This PR updates the nginx configuration to forward to inner relays all requests that go to /api/0/relays/*. The rationale behind this change is that we don't want any more such endpoints to be hit in Sentry (for example when fetching project configs since in getsentry/sentry#72926 we removed the support to return the reduced configuration).

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (05fa62a) to head (3c75977).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3144   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files           3        3           
  Lines         203      203           
=======================================
  Hits          201      201           
  Misses          2        2           

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

@iambriccardo iambriccardo requested review from Dav1dde and a team June 19, 2024 08:54
nginx/nginx.conf Outdated Show resolved Hide resolved
Co-authored-by: Alexander Tarasov <[email protected]>
@iambriccardo iambriccardo merged commit da06c0f into master Jun 20, 2024
13 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/update-nginx branch June 20, 2024 12:56
@stayallive
Copy link
Contributor

@iambriccardo when deploying this change the relay container simply stops working because it can't connect to the relay container. Isn't the inner relay trying to retrieve the project config from itself now?

@Dav1dde
Copy link
Member

Dav1dde commented Jun 25, 2024

@stayallive can you try switching the upstream in the Relay config from:

upstream: "http://web:9000/"

to upstream: "http://sentry:9000/"?

@Dav1dde
Copy link
Member

Dav1dde commented Jun 25, 2024

Actually nvm, the sentry is just the Nginx upstream, so should be fine:

upstream sentry {
server web:9000;
keepalive 2;
}

Relay should connect to Sentry directly 🤔

@stayallive
Copy link
Contributor

I see, my relay is connecting to nginx though... this might have changed in the past... let me correct that!

@stayallive
Copy link
Contributor

Okay, user error here. Sorry!

I think a few (hundred) releases ago there was some other issue that was solved by connecting relay through nginx, but that has long been not needed anymore and was forgotten to revert. Seems to all be working now connecting straight to sentry! Thanks for the hint!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants