Skip to content
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

Release v1.21.7 #1833

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion specs/ClientInvocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ Basically the process is similar and the major different is that service underst

### Transient Mode(TODO)

## Limitations

> NOTES
>
> * Service cached pending invocations for at most __10 minutes__ for memory concerns and will notify server when timeout.
> * Serverless is __NOT__ supporeted in the first stage.
> * ASPNET SignalR is __NOT__ supported.
> * Sharding is __NOT__ supported. Please use [Geo-Replication](https://learn.microsoft.com/azure/azure-signalr/howto-enable-geo-replication) for combined client invocation and large scale scenarios.
> * Sharding is __NOT__ fully supported yet. Please use [Geo-Replication](https://learn.microsoft.com/azure/azure-signalr/howto-enable-geo-replication) for combined client invocation and large scale scenarios. Also see [this](https://github.com/Azure/azure-signalr/pull/1828) for planning.
1 change: 1 addition & 0 deletions specs/ServiceProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ EMPTY | EMPTY | Both | Keep server connection alive ping
`offline` | `finack` | Service -> Server | Response of received `offline` request
`servers` | EMPTY | Server -> Service | Request to get all server ids connect to the service
`servers` | `<timestamp>:<server1>;<server2>` | Service -> Server | Response of `servers` ping of all server ids
`echo` | `<identify>` | Service <-> Server | Identify the latency of server connection, available from SDK 1.21.6.

## Message Encodings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ internal IEnumerable<ServiceEndpoint> GetRoutedEndpoints(ServiceMessage message)
case CloseConnectionMessage closeConnectionMessage:
return _router.GetEndpointsForConnection(closeConnectionMessage.ConnectionId, endpoints);

case ClientInvocationMessage clientInvocationMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(clientInvocationMessage.ConnectionId, endpoints), clientInvocationMessage);

case ServiceMappingMessage serviceMappingMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(serviceMappingMessage.ConnectionId, endpoints), serviceMappingMessage);

case ServiceCompletionMessage serviceCompletionMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(serviceCompletionMessage.ConnectionId, endpoints), serviceCompletionMessage);

default:
throw new NotSupportedException(message.GetType().Name);
}
Expand Down Expand Up @@ -416,6 +425,20 @@ private async Task WaitForClientsDisconnect(HubServiceEndpoint endpoint)
Log.TimeoutWaitingClientsDisconnect(_logger, endpoint.ToString(), (int)_scaleTimeout.TotalSeconds);
}

private IEnumerable<ServiceEndpoint> SingleOrNotSupported(IEnumerable<ServiceEndpoint> endpoints, ServiceMessage message)
{
var endpointCnt = endpoints.ToList().Count;
if (endpointCnt == 1)
{
return endpoints;
}
if (endpointCnt == 0)
{
throw new ArgumentException("Client invocation is not sent because no endpoint is returned from the endpoint router.");
}
throw new NotSupportedException("Client invocation to wait for multiple endpoints' results is not supported yet.");
}

internal static class Log
{
private static readonly Action<ILogger, string, Exception> _startingConnection =
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<!-- major.minor.patch[.build] -->
<VersionPrefix>1.21.6</VersionPrefix>
<VersionPrefix>1.21.7</VersionPrefix>
<VersionPrefix Condition="'$(MSBuildProjectName)' == 'Microsoft.Azure.SignalR.Emulator'">1.1.0</VersionPrefix>
<VersionPrefix Condition="'$(MSBuildProjectName)' == 'Microsoft.Azure.SignalR.Serverless.Protocols'">1.9.0</VersionPrefix>
<!-- Alphanumberic(+hyphen) string for PackageVersion and InformationalVersion-->
Expand Down