Skip to content

fix(search): Don't call an environment unknown when the search returns rows in it - #2911

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/search-unknown-environment-with-results
Draft

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/search-unknown-environment-with-results

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Search tools add a "Requested environment not found in this organization" note whenever a requested environment is missing from GET /organizations/{org}/environments/. That list isn't a full record of environments with data: Sentry only creates EnvironmentProject rows from its own processing paths (errors, transactions, span segments, crons, feedback, deploys), and leaves out hidden environments by default. An environment seen only on logs is never listed, so search_logs returned production rows and, in the same response, said production doesn't exist.

The note is now added only when the search returned nothing. Rows that match prove the environment exists. Empty results keep the note, so typos are still caught.

Fixes #2910

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_0802c12f60839dcdc11d1bae749f3464.

--

View Session [Sentry]

…s rows in it

Sentry's environment list only holds environments that its own processing
paths record (errors, transactions, spans, crons, feedback), so an
environment seen only on logs is missing from it. Search tools then warned
that the environment doesn't exist while returning rows in it. Add the
unknown-environment note only when the search returned nothing.

Fixes #2910
@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Dec 4, 2026 5:57pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 4, 2026 5:57pm UTC

Request Review

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – cli — 0ded0807 Deployed Dec 4, 2026 by vercel[bot]
Actions — 0ded0807 Deployed Dec 4, 2026 by sentry-junior[bot] via eval #2270
Preview – sentry-local — 0ded0807 Deployed Dec 4, 2026 by vercel[bot]
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.

Search tools warn that an environment doesn't exist when the search returned rows in it

0 participants