A 403 on reschedule leaves the queue message stuck for the full 300 s claim

Abierto
#4,829 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Start in the processMessage path of @vercel/queue, where the reschedule failure is logged and swallowed, and in handleCallback, which still returns HTTP 200. Then check directiveCallWithRetries, which retries only network errors and 429s, and the world-vercel retry callback tied to #1999. Done means a 403 on reschedule is either retried or falls back to the trigger's retryAfterSeconds, with the test showing the message is not left for the 300 s claim.

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

Descripción

What happens

When a step's retry reschedule (changeVisibility) gets a 403 Forbidden, @vercel/queue's processMessage logs Failed to reschedule message for retry: and returns, and handleCallback still answers the push with HTTP 200. The message is then neither acknowledged nor rescheduled, so it only comes back when the push claim expires, about 305 s later.

directiveCallWithRetries retries only network errors and 429s with Retry-After, so a 403 is never retried.

Why it matters

The world-vercel retry callback asks for a 1 s retry after a failed sendMessage, but when Queues answers that sendMessage with 403, the reschedule usually gets the same 403. A step that should retry in 1 s then waits about 5 minutes. We saw 28 of these 403s in 14 days (26 on one day), on production and preview deployments, all using the deployment's OIDC token. In each case we checked, the flow was redelivered 305 s after the failed invocation.

Versions

  • @workflow/world-vercel 5.0.1 with @vercel/queue 0.5.1, and 5.2.0 with @vercel/queue 0.8.0 (both bundled by eve); the retry, reschedule and swallow logic is the same in both.
  • Vercel Functions, iad1.

Asks

  1. Retry the reschedule on 403, or fall back to the trigger's retryAfterSeconds, instead of waiting out the claim.
  2. Is a 403 from Queues on a valid deployment OIDC token expected and transient? Happy to share request ids privately.

Related: #1999, which added the retry callback because the default was a 300 s lock.

Lenguaje dominante
TypeScript
Estrellas
2.5k
Forks
401
Merge medio
1 d 21 h
PR fusionados (30 d)
201

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 vercel/workflow

Todos los issues de vercel/workflow

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.