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

Return nil proxy function if proxy not enabled #16742

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

zeripath
Copy link
Contributor

Unfortunately #16704 contains a bug whereby if the proxy is not enabled all requests fail due to a panic.

This PR sets the proxy function to return a nil function if the proxy is not enabled.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Aug 19, 2021
@zeripath zeripath added this to the 1.16.0 milestone Aug 19, 2021
@zeripath
Copy link
Contributor Author

zeripath commented Aug 19, 2021

Please note:

As I mentioned #16704 (comment) #16704 is BREAKING as Gitea will now only use a system defined proxy if you actively turn on the proxy service.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 19, 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 Aug 19, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #16742 (e3149c7) into main (4debb74) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16742   +/-   ##
=======================================
  Coverage   45.37%   45.37%           
=======================================
  Files         760      760           
  Lines       85482    85483    +1     
=======================================
+ Hits        38785    38791    +6     
+ Misses      40414    40412    -2     
+ Partials     6283     6280    -3     
Impacted Files Coverage Δ
modules/proxy/proxy.go 15.15% <0.00%> (-3.60%) ⬇️
modules/process/manager.go 72.83% <0.00%> (-2.47%) ⬇️
modules/log/event.go 60.64% <0.00%> (-1.86%) ⬇️
models/repo_list.go 77.64% <0.00%> (-0.79%) ⬇️
services/pull/pull.go 42.19% <0.00%> (+0.40%) ⬆️
routers/api/v1/repo/pull.go 29.63% <0.00%> (+0.51%) ⬆️
modules/queue/workerpool.go 55.72% <0.00%> (+1.14%) ⬆️
modules/queue/unique_queue_disk_channel.go 48.63% <0.00%> (+1.36%) ⬆️
modules/queue/manager.go 68.18% <0.00%> (+2.84%) ⬆️

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 4debb74...e3149c7. Read the comment docs.

@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 Aug 19, 2021
@techknowlogick techknowlogick merged commit 0393789 into go-gitea:main Aug 19, 2021
@zeripath zeripath deleted the fix-panic-with-no-proxy branch August 19, 2021 21:12
@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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants