mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-26 05:21:15 +00:00
[AZ-1074] [AZ-1075] gRPC tile stream tests and shared proto
Extract tile_provision.proto into GrpcContracts, add integration tests and validation hardening for DeliverRouteTiles streaming. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,14 +27,12 @@ public sealed class RouteTileDeliveryGrpcService : RouteTileDelivery.RouteTileDe
|
||||
{
|
||||
if (request.Route is null)
|
||||
{
|
||||
await WriteErrorAsync(responseStream, "INVALID_REQUEST", "route is required", retryable: false, context.CancellationToken);
|
||||
return;
|
||||
throw new RpcException(new Status(StatusCode.InvalidArgument, "route is required"));
|
||||
}
|
||||
|
||||
if (!Guid.TryParse(request.Route.RouteId, out var routeId))
|
||||
{
|
||||
await WriteErrorAsync(responseStream, "INVALID_REQUEST", "route_id must be a UUID", retryable: false, context.CancellationToken);
|
||||
return;
|
||||
throw new RpcException(new Status(StatusCode.InvalidArgument, "route_id must be a UUID"));
|
||||
}
|
||||
|
||||
var job = MapJob(request, routeId);
|
||||
@@ -47,7 +45,7 @@ public sealed class RouteTileDeliveryGrpcService : RouteTileDelivery.RouteTileDe
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Invalid route tile delivery request for route {RouteId}", routeId);
|
||||
await WriteErrorAsync(responseStream, "INVALID_REQUEST", ex.Message, retryable: false, context.CancellationToken);
|
||||
throw new RpcException(new Status(StatusCode.InvalidArgument, ex.Message));
|
||||
}
|
||||
catch (OperationCanceledException) when (context.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user