-
Notifications
You must be signed in to change notification settings - Fork 21
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
[workarround] Drivers from server #122
Conversation
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
I guess this is a temporary fix until we get this functionality implemented in the clients, right? Related: bblfsh/scala-client#68 |
3123fc9
to
b38ac01
Compare
exactly! bblfsh/sdk#253 |
dispatch({ type: LOADING }); | ||
export const load = () => (dispatch, getState) => { | ||
const { options: { customServer, customServerUrl } } = getState(); | ||
const from = customServer ? customServerUrl : undefined; |
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.
we might need a selector for it, I remember we have such code in code base a few times already.
Looks really good, 👍 @dpordomingo - we can deliver this feature that would allow for adding new drivers easier, use this approach until SDK is changed and then refactor to a new one. One question: is there a reason why it's now |
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.
LGFM.
But 2 points:
- Need rebase. Commit 3cd4990 has a name "Prepare the fetch drivers from server" but there is only empty line removal.
- Please try to split work to separate PRs in the future. Current PR contains:
- makefile refactoring
- adding vendoring
- the code itself
I did the same that done for |
codecov reports |
Yes @smacker I MUST add some tests to keep (at least) the original test coverage. I just wanted to gather some reviews before adding tests 👯♂️ |
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
b38ac01
to
b62969e
Compare
Thanks for your review;
Feel free to confirm it if you prefer having separated PRs, and I'll do so. New changes:
|
If I understand how this goes, this will need changes in the way we deploy things if we want it work properly. Driver versions are currently pulled from the values in the helm deployment and are created inside the container. We can update them, but if the pod is recreated, the versions of the drivers will be those of the helm release and not whatever. We will need attach a volume per pod and introduce logic to determine if we want to deploy drivers or not, which will definitely cause trouble. I don't see a good way of this working. Please organise a meeting to discuss it. |
Thanks @rporres for taking a look at this! |
@dpordomingo I think we can keep this PR as it is for now. Just in the future try to do smaller PRs please. (for example refactoring of making things private and comments can be another PR also, it would help with review) |
@rporres, why a volume? The drivers can be downloaded inside of the container. For me every deploy a new dashboard, bblfshd, requires downloading all the repositories. We should consider, from now and forever, k8s as a stateless environment. As soon we accept this everything will go better. |
@dpordomingo also who takes care of the charts, is Infrastructure. BTW I don't know why this topic is threated on this issue about a frontend thing, the server is the same and was working like this sinces months, this changes just reflects a functionally that was on CLI on the Web. |
@mcuadros I understood we wanted to update the driver versions from the dashboard. I was suggesting scenarios that could make that possible that if we needed it. I very much agree that k8s should be as stateless as possible |
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.
LGTM
In future, it would be easier to review in case such work is split in multiple PRs
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
fix #89
blocks #123
I followed the sugestions made by @mcuadros at #89 (comment), so the backend will be able to call gRPC https://godoc.org/github.com/bblfsh/bblfshd/daemon/protocol to get the list of drivers
at fetchDrivers(ctx, protocol.ProtocolServiceClient) ([]*protocol.DriverImageState, error)
Testing it:
Run
bblfshd
:And the dashboard:
The installed drivers must be installed or listed adding the addr parameter to the
bblfshctl
command: