Defect: Exceptions when completing service bus messages posted via functions admin endpoints

Abierto
#188 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
54/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start by tracing how the functions admin endpoint creates Service Bus messages and how the extension handles actions.complete(message); the issue names no source files or tests. Check whether admin-posted messages should receive lock metadata, and whether completion should handle the zero lock token. Done when the cause is addressed and the reported exception no longer occurs for this case.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

When posting messages to a function's admin endpoint, i.e.:
http://localhost:7071/admin/functions/{myServiceBusFunction}

With a just request body as input.

That results in default values being populated for multiple message metadata fields, including:

        "enqueuedTime": "0001-01-01T00:00:00+00:00",
        "enqueuedTimeUtc": "0001-01-01T00:00:00",
        "expiresAt": "9999-12-31T23:59:59.9999999+00:00",
        "expiresAtUtc": "9999-12-31T23:59:59.9999999",
        "lockToken": "00000000-0000-0000-0000-000000000000",

The lock token value of: "00000000-0000-0000-0000-000000000000" results in an exception when calling the actions.complete(message) function from the service bus extension.

System.Private.CoreLib: Exception while executing function: Functions.myServiceBusFunction. System.Private.CoreLib: Result: Failure Type: Exception: 9 FAILED_PRECONDITION: LockToken 00000000-0000-0000-0000-000000000000 not found. Stack: Error: 9 FAILED_PRECONDITION: LockToken 00000000-0000-0000-0000-000000000000 not found. at callErrorFromStatus (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/call.ts:84:17) at Object.onReceiveStatus (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client.ts:360:36) at Object.onReceiveStatus (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client-interceptors.ts:466:34) at Object.onReceiveStatus (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48) at file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/resolving-call.ts:206:24 at processTicksAndRejections (node:internal/process/task_queues:85:11) for call at at ServiceClientImpl.makeUnaryRequest (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client.ts:325:42) at ServiceClientImpl.<anonymous> (file:///C:/project_folder/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/make-client.ts:189:15) at file:///C:/project_folder/packages/func/dist/functions/webpack:/@azure/functions-extensions-servicebus/src/servicebus/ServiceBusMessageActions.ts:67:25 at new Promise (<anonymous>) at ServiceBusMessageActions.<anonymous> (file:///C:/project_folder/packages/func/dist/functions/webpack:/@azure/functions-extensions-servicebus/src/servicebus/ServiceBusMessageActions.ts:65:16) at Generator.next (<anonymous>) at file:///C:/project_folder/packages/func/dist/functions/chunk-3CMJ3PCI.mjs:28225:77 at new Promise (<anonymous>) at __awaiter (file:///C:/project_folder/packages/func/dist/functions/chunk-3CMJ3PCI.mjs:28207:20) at ServiceBusMessageActions.complete (file:///C:/project_folder/packages/func/dist/functions/chunk-3CMJ3PCI.mjs:28274:22).

Not sure if this should be considered a defect in how @azure/functions-extensions-servicebus is processing the "00000000-0000-0000-0000-000000000000" value when completing messages or if the defect is that the metadata value is being inserted into messages in the first place.

The extra metadata doesn't get inserted when messages are posted to / coming from Service Bus itself.

Lenguaje dominante
TypeScript
Estrellas
2
Forks
8
Merge medio
1 h 6 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azure-functions-nodejs-extensions

Todos los issues de Azure/azure-functions-nodejs-extensions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.