Skip to content

Upgrade bleve from v2.0.6 to v2.3.0 #18132

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

Merged
merged 5 commits into from
Jan 1, 2022

Conversation

lunny
Copy link
Member

@lunny lunny commented Dec 30, 2021

Possible fix #18118

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Dec 30, 2021
@6543 6543 added this to the 1.16.0 milestone Dec 30, 2021
@6543
Copy link
Member

6543 commented Dec 30, 2021

@lunny we have to migrate code ...

modules/indexer/code/bleve.go:427:17: cannot range over languagesFacet.Terms (type *search.TermFacets)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 30, 2021
@Gusted
Copy link
Contributor

Gusted commented Dec 30, 2021

Possible fix #18118

Unless some package is using bleve v2.3.0 whereby the compiled code is using that version instead of the vendored v2.0.6, then their isn't anything to fix. V2.3.0 introduces some breaking changes(which we are impacted by), but they shouldn't be happening on our current version. So it's rather how the question that it comes someone is using v2.3.0 instead of the vendored one. I'm not against this change, I'd just feel that it kind of works around a problem that shouldn't be happening.

@lunny lunny force-pushed the lunny/upgrade_bleve branch from 81c02fe to a14a7e2 Compare December 31, 2021 08:02
@lunny
Copy link
Member Author

lunny commented Dec 31, 2021

@lunny we have to migrate code ...

modules/indexer/code/bleve.go:427:17: cannot range over languagesFacet.Terms (type *search.TermFacets)

done.

@lunny
Copy link
Member Author

lunny commented Dec 31, 2021

Looks like some performance optimization blevesearch/bleve#1404

Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only question is that whether bleve 2.3.0 can read/write the data of 2.0.6.

If yes, it's good to follow the latest vendor package.

If no .... well, it's still fine to me but we need to tell users (or re-generate the indexers).

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 31, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 31, 2021
@lunny
Copy link
Member Author

lunny commented Jan 1, 2022

My only question is that whether bleve 2.3.0 can read/write the data of 2.0.6.

If yes, it's good to follow the latest vendor package.

If no .... well, it's still fine to me but we need to tell users (or re-generate the indexers).

There is no break changelog from 2.0.6 to 2.3.0 and I have a simple test, the upgrade is smooth.

@codecov-commenter
Copy link

Codecov Report

Merging #18132 (84909da) into main (1a4e2bf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18132   +/-   ##
=======================================
  Coverage   45.01%   45.01%           
=======================================
  Files         825      825           
  Lines       91538    91538           
=======================================
+ Hits        41207    41208    +1     
+ Misses      43745    43743    -2     
- Partials     6586     6587    +1     
Impacted Files Coverage Δ
modules/indexer/code/bleve.go 66.52% <100.00%> (ø)
modules/queue/queue_channel.go 95.00% <0.00%> (-1.67%) ⬇️
modules/queue/queue_bytefifo.go 59.28% <0.00%> (-0.60%) ⬇️
routers/api/v1/repo/pull.go 28.69% <0.00%> (-0.51%) ⬇️
modules/queue/workerpool.go 49.23% <0.00%> (+2.29%) ⬆️

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 1a4e2bf...84909da. Read the comment docs.

@wxiaoguang wxiaoguang merged commit 25a290e into go-gitea:main Jan 1, 2022
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@lunny lunny deleted the lunny/upgrade_bleve branch August 24, 2023 11:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

range over the pointer of a slice
7 participants