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

don't record error when request a non-exist user #15819

Merged
merged 3 commits into from
May 10, 2021

Conversation

lunny
Copy link
Member

@lunny lunny commented May 10, 2021

As title.

@lunny lunny added the type/enhancement An improvement of existing functionality label May 10, 2021
routers/repo/http.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 10, 2021
Co-authored-by: zeripath <art27@cantab.net>
@zeripath
Copy link
Contributor

zeripath commented May 10, 2021

If there a particular common user that is being reported because of this e.g. serviceworker.js then applying this will mean that we're hiding an actual performance problem. For example - we shouldn't be trying to get serviceworker.js from the db in the first place as it's an invalid username.

@lunny
Copy link
Member Author

lunny commented May 10, 2021

If there a particular common user that is being reported because e.g. serviceworker.js then applying this will mean that we're hiding an actual performance problem. For example - we shouldn't be trying to get serviceworker.js from the db in the first place as it's an invalid username.

I think some router tests should resolve the problem. This PR is to prevent to log code stack when a non-exist user.

@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 May 10, 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 May 10, 2021
@techknowlogick
Copy link
Member

🚀

@techknowlogick techknowlogick merged commit d37a89e into go-gitea:main May 10, 2021
@lunny lunny deleted the lunny/user_not_exist_404 branch May 11, 2021 06:51
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
* don't record error when request a non-exist user

* Update routers/repo/http.go

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants