-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Protocol version negotiation currently doesn't result in agreement #9584
Comments
Both sides need to agree on a version (with `std::min`) for anything to work. Somehow... we've never done this. With this comment, the next commit succeeds. Without this commit, the next commit fails. This is because the next commit exposes serializers which do different things for proto version 2.7, and we're currently requesting 2.6. Opened NixOS/nix#9584 to track this issue
#6134, and doing the equivalent for the handshake for |
@Ericson2314 Is this still an issue now that #6134 is merged? |
@edolstra yes it is. I did something for this in hydra but it needs to be moved to Nix and made part of the unit tests. The factoring out of serializers did not cover the handshakes. I just factored out the legacy ssh handshake so far. This can stay assigned to me. |
1. Hydra currently queries for multiple path infos at once, so let us make a connection item for that. 2. The minimum of the two versions should always be used, see #9584. (The issue remains open because the daemon protocol needs to be likewise updated.)
This increases test coverage, and gets the worker protocol ready to be used by Hydra. Why don't we just try to use the store interface in Hydra? Well, the problem is that the store interface works on connection pools, with each opreation getting potentially a different connection, but the way temp roots work requires that we keep one logical "transaction" (temp root session) using the same connection. The longer-term solution probably is making connections themselves implement the store interface, but that is something that builds on this, so I feel OK that this is not churn in the wrong direction. Fixes NixOS#9584
This increases test coverage, and gets the worker protocol ready to be used by Hydra. Why don't we just try to use the store interface in Hydra? Well, the problem is that the store interface works on connection pools, with each opreation getting potentially a different connection, but the way temp roots work requires that we keep one logical "transaction" (temp root session) using the same connection. The longer-term solution probably is making connections themselves implement the store interface, but that is something that builds on this, so I feel OK that this is not churn in the wrong direction. Fixes NixOS#9584
As far as I can tell, here is how the "serve protocol" and "worker protocol" both do it:
But that means if the two versions are not the same, the two ends of the connection will be using different versions! Madness!
I think we forgot one simple step:
Then both sides will end up with the same version. Problem solved!
The text was updated successfully, but these errors were encountered: