eclipse-csi / otterdog

OtterDog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively used by the Eclipse Foundation to manage its numerous projects hosted on GitHub.
https://otterdog.readthedocs.org
Eclipse Public License 2.0
23 stars 4 forks source link

Change use of ghproxy from proxy mode to URL replacing #297

Open netomi opened 3 hours ago

netomi commented 3 hours ago

Currently, sometimes we receive some weird errors when starting up the GitHub app in ghproxy:

ghproxy-1      | 2024/10/17 20:06:39 http: panic serving 172.18.0.5:50268: runtime error: slice bounds out of range [15:10]
ghproxy-1      | goroutine 180 [running]:
ghproxy-1      | net/http.(*conn).serve.func1()
ghproxy-1      |    net/http/server.go:1898 +0xbe
ghproxy-1      | panic({0x1d45460?, 0xc0005760a8?})
ghproxy-1      |    runtime/panic.go:770 +0x132
ghproxy-1      | net/http.(*timeoutHandler).ServeHTTP(0xc0006929c0, {0x22ed0c8, 0xc000753a40}, 0xc000ab8120)
ghproxy-1      |    net/http/server.go:3601 +0x768
ghproxy-1      | net/http.serverHandler.ServeHTTP({0xc00090f5c0?}, {0x22ed0c8?, 0xc000753a40?}, 0x6?)
ghproxy-1      |    net/http/server.go:3137 +0x8e
ghproxy-1      | net/http.(*conn).serve(0xc000ab6120, {0x22fb3a8, 0xc000613080})
ghproxy-1      |    net/http/server.go:2039 +0x5e8
ghproxy-1      | created by net/http.(*Server).Serve in goroutine 86
ghproxy-1      |    net/http/server.go:3285 +0x4b4

As we currently use ghproxy in proxy mode, check if the error could be resolved when using url rewriting instead.

ghproxy will transparently forward any request to GitHub so a proxy mode is not needed.

netomi commented 3 hours ago

Created https://github.com/kubernetes-sigs/prow/issues/281