-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat!: rewrite the API gateway in go #709
Conversation
a9b375a
to
9d9f293
Compare
faceab5
to
c4640a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this Flora!
I apologize if I added comments on code that you did not touch at all. It has been a while so I cannot even remember what I wrote and what you have modified/added.
internal/sessions/session_store.go
Outdated
utils.GetRequestID(c), | ||
) | ||
} | ||
c.Set(SessionCtxKey, session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion/question: Why set the session if there could have been an error when you are trying to get it? My understanding here is that you expect a valid new session to be returned from Get even if it errors out, is that right? If yes, I think we should not expect session.Get to give you a valid empty session when it errors out. And even it if did using the result from a method that errored out is just weird. I think it would be nicer here to just create a new session either from scratch or with a dedicated function (i.e. smth like NewSession()
) and then use that when session.Get errors out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the middleware will not create a new session if none is found. Only the endpoints which need a session will do so with Create()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Rewrites the API Gateway in Go. All the functionality of the API Gateway is now located inside a single component.
Details:
This refactor requires changes in
ui-server
(removal of login handling) and inrenku
(changes in ingress and deployment ofrenku-gateway
).See also:
/deploy renku=leafty/gateway-refactor renku-ui=leafty/refactor-gateway