Repository navigation
Conversation
- ConnectionRouter.pair_speaks_protocol() says whether this client and a peer both speak a syft protocol version. A behaviour that a later protocol adds can then stay off for a peer that does not speak it. A peer with an unknown schema gets False. - ConnectionRouter.negotiated_protocol_version_for_peer() returns the negotiated version. _downgrade_for_peer() uses the same negotiation. - syft-migration exports protocol_version_at_least(), which compares versions as integers. - The next_protocol and pin_syft_protocol test fixtures hold one client at the released protocol and run the other on a test-only next protocol. test_protocol_skew_pair.py runs a job round trip between them. - The datasite settings file carries a format version. A file of another version is refused, as the key file is.
- The settings file's version is checked on the raw JSON before the fields are validated, so a later layout is refused by its version, not by a pydantic error. Only a later version is refused, as for checkpoints and rolling state. The key file keeps its own check. - MigrationRegistry.infer_protocol_version_to_use() takes the peer's ProtocolSchema. The router, JobStorage and DatasetStorage pass the schema, and the router's wrapper is gone. - The control test also checks that a pair speaks an earlier protocol, so an equality check fails it. - pair_speaks_protocol() documents MigrationError, the pin_syft_protocol docstring says what it does not hold back, and the syft-migration README lists protocol_version_at_least().
- _peer() is now _peer_schema(), because it returns the schema a peer advertises. - Four floor tests drop their articles, for example test_the_peer_floor_refuses_us() is now test_peer_floor_refuses_us().
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A per-peer switch keeps behaviour from a later syft protocol off for a peer that does not speak it. Test fixtures pair a client on the released protocol with one on a test-only next protocol. Last item of "connsplit v1.2: Owner delivery".
Changes
ConnectionRouter.pair_speaks_protocol(): False for a peer with an unknown schema. No callers yet.MigrationRegistry.infer_protocol_version_to_use()takes the peer'sProtocolSchema.protocol_version_at_least().next_protocolandpin_syft_protocol().syft_settings.jsoncarries a version; a later version is refused.Testing
test_protocol_skew_pair.py: job round trip with either side on the released protocol.Asana task