Skip to content

devservices: add config for proxy and ingest-router#122

Merged
lynnagara merged 3 commits intomainfrom
devservices
May 7, 2026
Merged

devservices: add config for proxy and ingest-router#122
lynnagara merged 3 commits intomainfrom
devservices

Conversation

@lynnagara
Copy link
Copy Markdown
Member

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.

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.
@lynnagara lynnagara requested a review from a team as a code owner May 6, 2026 22:33
Comment thread devservices/ingest-router.yaml Outdated
Comment thread devservices/proxy.yaml Outdated
Comment thread devservices/ingest-router.yaml Outdated
Comment thread devservices/proxy.yaml
resolver: cell_from_organization
cell_to_upstream:
"--monolith--": sentry-dev-monolith
# default: sentry-dev-monolith
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread devservices/proxy.yaml
url: http://host.docker.internal:8000
routes:
- match:
host: localhost
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cbd756b. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One other thing to think about is that our local dev environments run sentry on dev.getsentry.net and not on localhost.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good to try and move forward.

Comment thread devservices/proxy.yaml
url: http://host.docker.internal:8000
routes:
- match:
host: localhost
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One other thing to think about is that our local dev environments run sentry on dev.getsentry.net and not on localhost.

@lynnagara lynnagara merged commit 4950d7b into main May 7, 2026
14 checks passed
@lynnagara lynnagara deleted the devservices branch May 7, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants