Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

insights: Filtering by context should OR together multiple repos #45574

Merged
chwarwick merged 3 commits into
mainfrom
cw/context-filter
Dec 13, 2022
Merged

insights: Filtering by context should OR together multiple repos #45574
chwarwick merged 3 commits into
mainfrom
cw/context-filter

Conversation

@chwarwick

Copy link
Copy Markdown
Contributor

When filtering an insight by a search context that contains multiple repos, the generated sql was combining the repo name conditions with an AND which was excluding all of the data.

This does not effect the exclude repos case which should continue to use an AND condition.

closes https://github.com/sourcegraph/sourcegraph/issues/45032

Test plan

Create a search context with two repo filters
Generate an insight over those repos
Filter the insight by the search context - all data should remain
Edit the context to only be 1 repo - filtered insight should show 1 repo of data

@chwarwick chwarwick requested a review from a team December 12, 2022 18:27
@cla-bot cla-bot Bot added the cla-signed label Dec 12, 2022
@sourcegraph-bot

sourcegraph-bot commented Dec 12, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 1d14e5e...33050f2.

Notify File(s)
@sourcegraph/code-insights-backend enterprise/internal/insights/store/store.go

Comment thread CHANGELOG.md Outdated
Co-authored-by: leo <leo.p@sourcegraph.com>
@chwarwick chwarwick merged commit 0371c15 into main Dec 13, 2022
@chwarwick chwarwick deleted the cw/context-filter branch December 13, 2022 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insight filtered by context shows no data

3 participants