label: search returns pull requests that no longer have the label
#203116
Replies: 4 comments
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Looking at the PR timeline, this strengthens the case that this is a search indexing bug. The history clearly shows:
Since the timeline explicitly records the label removal, the current state of the PR is correct. However, the search query: still returns the PR, even though it no longer satisfies the query. That suggests GitHub's search index is retaining a historical association with the label instead of reflecting the current label state. In other words, the repository data and the search index appear to be out of sync. Given the reproducible example and the timeline evidence, I'd consider this a legitimate bug in GitHub's search indexing rather than expected behavior. |
Confirmed, and it isn't a UI thing — the same query through the search API returns the same stale results, so a browser cache or the logged-out rendering path isn't involved: gh api graphql -f query='query{search( query:"repo:vivid-planet/comet is:pr label:needs-v8-backport is:closed", type:ISSUE, first:30){issueCount nodes{... on PullRequest{number labels(first:10){nodes{name}}}}}}'I then walked the timeline of every closed PR in the repo that ever carried
That rules out the usual explanations:
So it looks like a subset of records just never got reindexed after the Might be worth editing the five PR numbers into your original post — it gives whoever picks this up a clean set to look at rather than a single example. One thing you could try as a stopgap, though I can't test it without write access to that repo: re-apply the label to one of the five and remove it again. If a fresh |
I also am running into the same issue. Removing the label from the UI removes it from the PR, but only visually. The PR is still showing in the PR list if you filter by the label. I tried to remove the label with GitHub CLI as well: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Lists
Body
label:search returns pull requests that no longer have the labelRepository
https://github.com/vivid-planet/comet
Query
Direct link:
https://github.com/vivid-planet/comet/pulls?q=is%3Apr+label%3Aneeds-v8-backport+is%3Aclosed
Steps to reproduce
Expected behavior
The
label:needs-v8-backportsearch qualifier should only return pull requests that currently have theneeds-v8-backportlabel.Actual behavior
The search returns pull requests that no longer have the
needs-v8-backportlabel, suggesting that the search index is stale or out of sync with the current label state.Example affected PR
Additional information
This appears to affect closed pull requests. The PR no longer has any labels, yet it still matches the
label:needs-v8-backportsearch qualifier.All reactions