Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditions that code cannot be searched #26723

Closed
loynoir opened this issue Aug 25, 2023 · 3 comments · Fixed by #27018
Closed

conditions that code cannot be searched #26723

loynoir opened this issue Aug 25, 2023 · 3 comments · Fixed by #27018
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug

Comments

@loynoir
Copy link

loynoir commented Aug 25, 2023

Description

BUG

cannot search code

  • or when code is within non-newest commit

  • or when code is within non-default branch

  • or when code is within non-default branch X, but now X is default branch

reproduce

  • copy paste indexer config from docs

  • echo '"HELLO"' > reproduce.js, commit

  • echo '"WORLD"' > reproduce.js, commit

  • push to non-default branch test

  • stop gitea, rm indexers/repos.bleve, start gitea

  • ensure default branch is main

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got nothing, which is unexpectedly

  • update default branch from main to test

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got nothing, which is unexpectedly

  • stop gitea, rm indexers/repos.bleve, start gitea

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got match

  • update default branch from test to main

  • stop gitea, rm indexers/repos.bleve, start gitea

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker image docker.io/gitea/gitea:1.20.3

Database

None

@loynoir loynoir changed the title unexpected code search cannot search code condition Aug 25, 2023
@loynoir loynoir changed the title cannot search code condition conditions that code cannot be searched Aug 25, 2023
lunny pushed a commit that referenced this issue Sep 13, 2023
Fix #26723 
Add `ChangeDefaultBranch` to the `notifier` interface and implement it
in `indexerNotifier`. So when changing the default branch,
`indexerNotifier` sends a message to the `indexer queue` to update the
index.

---------

Co-authored-by: techknowlogick <matti@mdranta.net>
@loynoir
Copy link
Author

loynoir commented Sep 13, 2023

There are 3 conditions that code cannot be searched.

BUG

cannot search code

* or when code is within non-newest commit

* or when code is within non-default branch

* or when code is within non-default branch X, but now X is default branch

From the title of that pr, I guess pull/27018 only fix the third.

* or when code is within non-default branch X, but now X is default branch

There are still two conditions that code cannot be searched.
So, this issue should not be closed as completed. @lunny

cannot search code

* or when code is within non-newest commit

* or when code is within non-default branch

@lunny lunny reopened this Sep 13, 2023
@lng2020
Copy link
Member

lng2020 commented Sep 13, 2023

There are 3 conditions that code cannot be searched.

BUG
cannot search code

* or when code is within non-newest commit

* or when code is within non-default branch

* or when code is within non-default branch X, but now X is default branch

From the title of that pr, I guess pull/27018 only fix the third.

* or when code is within non-default branch X, but now X is default branch

There are still two conditions that code cannot be searched. So, this issue should not be closed as completed. @lunny

cannot search code

* or when code is within non-newest commit

* or when code is within non-default branch

Currently, we can't search on the non-default branch.
What's the procedure to reproduce the first one? I think it's caused by branch changing.

@lng2020 lng2020 added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Sep 21, 2023
@GiteaBot
Copy link
Contributor

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants