The Wayback Machine - https://web.archive.org/web/20220802105431/https://github.com/go-gitea/gitea/pull/16742
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

@zeripath zeripath commented Aug 19, 2021

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 [email protected]

@zeripath
Copy link
Contributor Author

@zeripath 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.

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Aug 19, 2021

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.

@techknowlogick techknowlogick merged commit 0393789 into go-gitea:main Aug 19, 2021
2 checks passed
@zeripath zeripath deleted the fix-panic-with-no-proxy branch Aug 19, 2021
@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.
Development

Successfully merging this pull request may close these issues.

None yet

6 participants