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

Improve efficiency in FindRenderizableReferenceNumeric and getReferences #16251

Merged

Conversation

zeripath
Copy link
Contributor

No description provided.

zeripath added 2 commits June 25, 2021 18:04
The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.0 milestone Jun 25, 2021
@zeripath zeripath changed the title Find renderizable reference numeric efficiency Improve efficiency in FindRenderizableReferenceNumeric and getReferences Jun 25, 2021
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 25, 2021
@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 Jun 25, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor Author

@techknowlogick fancy re-review?

@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 Jun 25, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #16251 (1b2ab6e) into main (9b33d18) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16251      +/-   ##
==========================================
+ Coverage   45.45%   45.48%   +0.02%     
==========================================
  Files         708      708              
  Lines       83418    83417       -1     
==========================================
+ Hits        37921    37945      +24     
+ Misses      39423    39399      -24     
+ Partials     6074     6073       -1     
Impacted Files Coverage Δ
modules/references/references.go 84.98% <100.00%> (-0.06%) ⬇️
services/pull/pull.go 41.99% <0.00%> (ø)
models/gpg_key.go 51.99% <0.00%> (+0.56%) ⬆️
routers/api/v1/repo/pull.go 28.74% <0.00%> (+0.59%) ⬆️
services/pull/patch.go 55.93% <0.00%> (+1.69%) ⬆️
modules/notification/mail/mail.go 38.23% <0.00%> (+1.96%) ⬆️
services/pull/check.go 28.27% <0.00%> (+2.75%) ⬆️
modules/queue/manager.go 68.36% <0.00%> (+2.82%) ⬆️
services/pull/temp_repo.go 29.78% <0.00%> (+3.19%) ⬆️
services/mailer/mail_comment.go 85.18% <0.00%> (+7.40%) ⬆️

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 9b33d18...1b2ab6e. Read the comment docs.

@6543 6543 merged commit 62a4879 into go-gitea:main Jun 25, 2021
@zeripath zeripath deleted the FindRenderizableReferenceNumeric-efficiency branch June 25, 2021 23:11
zeripath added a commit to zeripath/gitea that referenced this pull request Jun 25, 2021
…ces (go-gitea#16251)

* The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw
* Make FindRenderizableReferenceNumeric and getReferences more efficient

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@noerw noerw added the backport/done All backports for this PR have been created label Jun 26, 2021
zeripath added a commit that referenced this pull request Jun 26, 2021
…ce (#16251) (#16255)

* Improve efficiency in FindRenderizableReferenceNumeric and getReferences (#16251)

* The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw
* Make FindRenderizableReferenceNumeric and getReferences more efficient

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>

* as per comment on original pr

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
…ces (go-gitea#16251)

* Fuzzer finds an NPE due to incorrect URLPrefix

The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw


* Make FindRenderizableReferenceNumeric and getReferences more efficient

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants