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

Bump gin to fix the infinite loop and index our of range errors #1115

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

jimmykarily
Copy link
Contributor

Fixes #1114

@jimmykarily jimmykarily requested a review from a team as a code owner January 12, 2022 10:27
@jimmykarily
Copy link
Contributor Author

This bump includes various fixes around routes in gin (e.g. gin-gonic/gin#2897, gin-gonic/gin#2878). With this bump we can't reproduce the problem anymore. Given how unreadable the httprouter code is, we won't invest more time in this. Hopefully this is a blind fix.

(original url that triggered the infinite loop was /api/v1/namespaces/workspace/applications/test/deployasdf)

@manno
Copy link
Member

manno commented Jan 12, 2022

Some explanation on what the httprouter code does: https://github.com/julienschmidt/httprouter#how-does-it-work

These are the routes we use:

DELETE /namespaces/:namespace
DELETE /namespaces/:namespace/applications/:app
DELETE /namespaces/:namespace/applications/:app/environment/:env
DELETE /namespaces/:namespace/applications/:app/servicebindings/:service
DELETE /namespaces/:namespace/services/:service
GET    /applications
GET    /info
GET    /namespacematches
GET    /namespacematches/:pattern
GET    /namespaces
GET    /namespaces/:namespace
GET    /namespaces/:namespace/applications
GET    /namespaces/:namespace/applications/:app
GET    /namespaces/:namespace/applications/:app/environment
GET    /namespaces/:namespace/applications/:app/environment/:env
GET    /namespaces/:namespace/applications/:app/environmentmatch
GET    /namespaces/:namespace/applications/:app/environmentmatch/:pattern
GET    /namespaces/:namespace/applications/:app/logs
GET    /namespaces/:namespace/applications/:app/running
GET    /namespaces/:namespace/serviceapps
GET    /namespaces/:namespace/services
GET    /namespaces/:namespace/services/:service
GET    /namespaces/:namespace/staging/:stage_id/complete
GET    /namespaces/:namespace/staging/:stage_id/logs
GET    /services
PATCH  /namespaces/:namespace/services/:service
PATCH /namespaces/:namespace/applications/:app
POST   /namespaces
POST   /namespaces/:namespace/applications
POST   /namespaces/:namespace/applications/:app/deploy
POST   /namespaces/:namespace/applications/:app/environment
POST   /namespaces/:namespace/applications/:app/import-git
POST   /namespaces/:namespace/applications/:app/restart
POST   /namespaces/:namespace/applications/:app/servicebindings
POST   /namespaces/:namespace/applications/:app/stage
POST   /namespaces/:namespace/applications/:app/store
POST   /namespaces/:namespace/services
PUT    /namespaces/:namespace/services/:service

@jimmykarily jimmykarily merged commit 8660961 into main Jan 12, 2022
@jimmykarily jimmykarily deleted the 1114-fix-gin-router branch January 12, 2022 11:19
@juadk
Copy link
Contributor

juadk commented Jan 17, 2022

Maybe a blind fix but I don't see the issue anymore whereas I did a lot of installations last Friday and today. Thanks a lot again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI CORS pre-flight requests getting stuck
4 participants