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

オープン
#4,829 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
201

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vercel/workflow のほかの issue

vercel/workflow の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。