Dont generate connection_ids in the rust client.#3004
Merged
Conversation
Contributor
|
I don't think we need to deprecate the panicking |
gefjon
reviewed
Jul 30, 2025
gefjon
approved these changes
Jul 31, 2025
mamcx
pushed a commit
that referenced
this pull request
Aug 26, 2025
# Description of Changes This changes the behavior on the rust client, so that we let the server generate the connection id if the client hasn't called the unstable method to set a connection id. This is awkward for the `connection_id` function, since it now panics if the connection id hasn't been received from the server. We should deprecate this function in favor of a `try` version. This also changes the behavior of reusing the connection id if a client reconnects. The corresponding private PR is https://github.com/clockworklabs/SpacetimeDBPrivate/pull/1921. # API and ABI breaking changes Technically not changing any API signatures, but this is behavior-changing, since the `connection_id` function can now panic. # Expected complexity level and risk 2. The risk here is people relying on that behavior. # Testing I think some tests need to be updated.
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.
Description of Changes
This changes the behavior on the rust client, so that we let the server generate the connection id if the client hasn't called the unstable method to set a connection id.
This is awkward for the
connection_idfunction, since it now panics if the connection id hasn't been received from the server. We should deprecate this function in favor of atryversion.This also changes the behavior of reusing the connection id if a client reconnects.
The corresponding private PR is https://github.com/clockworklabs/SpacetimeDBPrivate/pull/1921.
API and ABI breaking changes
Technically not changing any API signatures, but this is behavior-changing, since the
connection_idfunction can now panic.Expected complexity level and risk
Testing
I think some tests need to be updated.