devservices: add config for proxy and ingest-router#122
Conversation
Adds devservices/config.yml so synapse can be brought up as a remote dependency of Sentry's cell-routing mode, plus single-cell dev configs for the `synapse-proxy` and `synapse-ingest-router` services.
| resolver: cell_from_organization | ||
| cell_to_upstream: | ||
| "--monolith--": sentry-dev-monolith | ||
| # default: sentry-dev-monolith |
There was a problem hiding this comment.
Bug: Commenting out the default upstream in proxy.yaml causes organization lookups to fail with a 404, as the fallback logic is bypassed when no locality is provided.
Severity: MEDIUM
Suggested Fix
Uncomment the default upstream in proxy.yaml to restore the fallback mechanism. This will ensure that requests for organizations not found by the locator are routed to the monolith, preventing 404 errors in single-cell development setups.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: devservices/proxy.yaml#L32
Potential issue: With the `default` upstream in `proxy.yaml` commented out, any
organization lookup failure in the proxy results in a 404 error instead of falling back
to the monolith. The resolver in `proxy/src/resolvers.rs` calls `self.locator.lookup`
with `None` for the `locality`. The fallback logic in `locator/src/locator.rs`, which
relies on `locality_to_default_cell`, is only triggered when a `locality` is provided.
Consequently, a lookup failure returns `LocatorError::NoCell`, which becomes a `None`
upstream, leading to a 404. This breaks the intended fallback behavior for new or
unknown organizations in development environments.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cbd756b. Configure here.
| url: http://host.docker.internal:8000 | ||
| routes: | ||
| - match: | ||
| host: localhost |
There was a problem hiding this comment.
Proxy route host match fails with non-standard port
Medium Severity
The proxy route specifies host: localhost, but the proxy's host matching logic in route_actions.rs compares the raw Host header value directly — it does not strip the port. For HTTP/1.1 requests to localhost:13000, the Host header is localhost:13000, which won't equal localhost, so the route silently fails to match and returns a 404. The ingest-router correctly strips ports before comparing, but the proxy does not. Removing the host constraint or including the port would fix this.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cbd756b. Configure here.
There was a problem hiding this comment.
One other thing to think about is that our local dev environments run sentry on dev.getsentry.net and not on localhost.
There was a problem hiding this comment.
yeah -- i think i'll need to test these against real sentry/relay to figure out the right values for the route config. for now, the whole block is just copy paste from the local config
markstory
left a comment
There was a problem hiding this comment.
Looks good to try and move forward.
| url: http://host.docker.internal:8000 | ||
| routes: | ||
| - match: | ||
| host: localhost |
There was a problem hiding this comment.
One other thing to think about is that our local dev environments run sentry on dev.getsentry.net and not on localhost.


Adds devservices/config.yml so synapse can be brought up as a remote dependency of Sentry's cell-routing mode, plus single-cell dev configs for the
synapse-proxyandsynapse-ingest-routerservices.