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

[WIP] Search for issues/pulls #387

Closed
wants to merge 23 commits into from

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented Dec 14, 2016

Issue #379.

@andreynering andreynering added type/feature Completely new functionality. Can only be merged if feature freeze is not active. pr/wip This PR is not ready for review labels Dec 14, 2016
@andreynering andreynering added this to the 1.1.0 milestone Dec 14, 2016
@tboerger
Copy link
Member

As I already said I dislike this kind of search. IMHO this have to be resolved with an indexer

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 14, 2016
@tboerger
Copy link
Member

This looks already promising, but maybe we should move the functionality into a service and also update the index in the background.

@lunny
Copy link
Member

lunny commented Dec 16, 2016

Yes. A service or a index queue is right action, not directly write index.

@ethantkoenig
Copy link
Member Author

I've moved the index writes to a background service. It still uses one index per repository.

@lunny, in #379 you mentioned using a single index for all issues/pulls, and that we then wouldn't even need a SQL query for searching issues/pulls. I am confused how we could continue support existing filters (by tag, or by creator) only using a index. If you could explain, I would happy to work on that next.

@tboerger
Copy link
Member

You need to index it with more attributes. Than you can still filter based on that.

@ethantkoenig
Copy link
Member Author

ethantkoenig commented Dec 16, 2016

So the index essentially becomes a second copy of the issues table (plus extra information like labels and mentions)?

@tboerger
Copy link
Member

With the benefit to be a real search index, yes.

@ethantkoenig ethantkoenig force-pushed the search_bar branch 13 times, most recently from 2d63a4f to 722ed02 Compare December 24, 2016 19:20
ethantkoenig and others added 6 commits December 25, 2016 14:51
* Implemented sendmail. This piggybacks on existing configuration to keep the change simple

* Changed privicy of new sendSMTP and sendSendmail functions

* Fixed Lint errors

* Seperated SMTP and sendmail into their own senders

* Making new structs private as they should not be used externally now

* Added sendmail setting to ini file

* Minor code cleanup
* provide button to delete merged pull request

* golint fix
* Import github.com/git-lfs/lfs-test-server as lfs module base

Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198

Removed:

Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md

* Remove config, add JWT support from github.com/mgit-at/lfs-test-server

Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83

* Add LFS settings

* Add LFS meta object model

* Add LFS routes and initialization

* Import github.com/dgrijalva/jwt-go into vendor/

* Adapt LFS module: handlers, routing, meta store

* Move LFS routes to /user/repo/info/lfs/*

* Add request header checks to LFS BatchHandler / PostHandler

* Implement LFS basic authentication

* Rework JWT secret generation / load

* Implement LFS SSH token authentication with JWT

Specification: https://github.com/github/git-lfs/tree/master/docs/api

* Integrate LFS settings into install process

* Remove LFS objects when repository is deleted

Only removes objects from content store when deleted repo is the only
referencing repository

* Make LFS module stateless

Fixes bug where LFS would not work after installation without
restarting Gitea

* Change 500 'Internal Server Error' to 400 'Bad Request'

* Change sql query to xorm call

* Remove unneeded type from LFS module

* Change internal imports to code.gitea.io/gitea/

* Add Gitea authors copyright

* Change basic auth realm to "gitea-lfs"

* Add unique indexes to LFS model

* Use xorm count function in LFS check on repository delete

* Return io.ReadCloser from content store and close after usage

* Add LFS info to runWeb()

* Export LFS content store base path

* LFS file download from UI

* Work around git-lfs client issue with unauthenticated requests

Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: git-lfs/git-lfs#1088

* Fix unauthenticated UI downloads from public repositories

* Authentication check order, Finish LFS file view logic

* Ignore LFS hooks if installed for current OS user

Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.

* Hide LFS metafile diff from commit view, marking as binary

* Show LFS notice if file in commit view is tracked

* Add notbefore/nbf JWT claim

* Correct lint suggestions - comments for structs and functions

- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion

* Move secret generation code out of conditional

Ensures no LFS code may run with an empty secret

* Do not hand out JWT tokens if LFS server support is disabled
@ethantkoenig
Copy link
Member Author

@lunny @tboerger I've added a single bleve indexer for all issues, containing all necessary attributes. I've also added a background service to asynchronously update the indexer when issues are created/edited/deleted.

@lunny
Copy link
Member

lunny commented Dec 28, 2016

I will review this

@tboerger
Copy link
Member

This PR is broken, you need to properly rebase it.

@tboerger tboerger added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Dec 29, 2016
@lunny
Copy link
Member

lunny commented Dec 29, 2016

git rebase master
# resolve conflicts
git push --force ethantkoenig:search_bar

@tboerger tboerger added reviewed/invalid and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR pr/wip This PR is not ready for review labels Jan 16, 2017
@tboerger tboerger removed this from the 1.1.0 milestone Jan 16, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
@delvh delvh added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea and removed reviewed/invalid labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea
Projects
None yet
Development

Successfully merging this pull request may close these issues.