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

Implement elastic search issue indexer interface #6150

Open
wants to merge 9 commits into
base: master
from

Conversation

@lunny
Copy link
Member

commented Feb 21, 2019

No description provided.

@lafriks lafriks added this to the 1.9.0 milestone Feb 21, 2019

@lunny lunny force-pushed the lunny:lunny/issue_indexer_es branch 2 times, most recently from bef5278 to 316de4c Apr 2, 2019

@lunny lunny changed the title WIP: implement elastic search issue indexer interface Implement elastic search issue indexer interface Apr 2, 2019

@lunny

This comment has been minimized.

Copy link
Member Author

commented Apr 2, 2019

It's ready for review now.

@GiteaBot GiteaBot added the lgtm/need 2 label Apr 2, 2019

Show resolved Hide resolved modules/indexer/issues/elastic_search.go Outdated
@codecov-io

This comment has been minimized.

Copy link

commented Apr 2, 2019

Codecov Report

Merging #6150 into master will decrease coverage by 0.35%.
The diff coverage is 7.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6150      +/-   ##
==========================================
- Coverage    40.5%   40.14%   -0.36%     
==========================================
  Files         405      404       -1     
  Lines       54351    54263      -88     
==========================================
- Hits        22013    21786     -227     
- Misses      29311    29461     +150     
+ Partials     3027     3016      -11
Impacted Files Coverage Δ
modules/indexer/issues/elastic_search.go 0% <0%> (ø)
modules/setting/indexer.go 100% <100%> (ø) ⬆️
modules/indexer/issues/indexer.go 61.9% <50%> (+1.4%) ⬆️
modules/log/router.go 0% <0%> (-90%) ⬇️
modules/setting/log.go 63.63% <0%> (-9.86%) ⬇️
routers/repo/commit.go 16.26% <0%> (-8.54%) ⬇️
modules/git/commit.go 36.81% <0%> (-7.88%) ⬇️
modules/log/log.go 63.86% <0%> (-7.57%) ⬇️
modules/log/colors.go 61.06% <0%> (-5.84%) ⬇️
routers/user/oauth.go 38.88% <0%> (-5.12%) ⬇️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 783cd64...1bf75b6. Read the comment docs.

@zeripath
Copy link
Contributor

left a comment

Hi lunny!

Looks good overall however I think you need to do a general search and replace of elestic for elastic. Done!

Your choice of a skip of 2 for the elastic logger seems unusual. 1 is usually correct as it points to where the Printf is called, unless elastic wraps the Printf itself in which case 2 is appropriate. I've just doublechecked the source. You're right!

You still need to add config stubs to modules/setting/log.go. Basically you need a setting ELASTIC which configures which sublogging modes that would use. You could make this generic and name it INDEXER? Then you could use the same named logger for different types of indexer?

Show resolved Hide resolved modules/indexer/issues/elastic_search.go

@lunny lunny force-pushed the lunny:lunny/issue_indexer_es branch from 316de4c to 44637ed Apr 3, 2019

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Apr 3, 2019


if !exists {
mapping := `{
"settings":{

This comment has been minimized.

Copy link
@lafriks

lafriks Apr 4, 2019

Member

Would be nice if this could be moved out to embedded file so that it could be customized using custom directory

This comment has been minimized.

Copy link
@lunny

lunny Apr 4, 2019

Author Member

Maybe a config item on app.ini to point to a mapping file which default are empty is better?

This comment has been minimized.

Copy link
@lafriks

lafriks Apr 5, 2019

Member

that could also be an option

@lunny lunny force-pushed the lunny:lunny/issue_indexer_es branch from 44637ed to 8f20faf Apr 4, 2019

Show resolved Hide resolved .drone.yml
Show resolved Hide resolved .drone.yml Outdated

lunny added some commits Feb 21, 2019

@lunny lunny force-pushed the lunny:lunny/issue_indexer_es branch from 1bf75b6 to ab901c9 Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.