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

未关闭
#4,829 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cloud, typescript

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
2.5k
派生
401
平均合并
1 天 21 小时
30 天内合并 PR
201

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

vercel/workflow 的其他 Issue

查看 vercel/workflow 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。