Deno Deploy: "Queues not available on preview environment" error in production right after deploy

The reporter deployed a Deno Deploy app to production via GitHub Actions (deployctl from the main branch, no preview promotion). Immediately after a deployment, the app threw "Queues not available on preview environment" even though it was running in production. It only happened when the service was hit right after a deploy; an automated smoke test that fired requests as soon as the deploy finished would see initial requests pass (old environment) and then fail (new environment not yet recognized as production). Waiting 5-8 minutes after deploy made it go away.

This was a platform-side race in how Deno Deploy classified a fresh deployment's environment. Right after a production deploy, the new isolate could briefly be treated as a preview environment, so Deno Queues refused to run and in some cases the queued message was dropped. Maintainer igorzi investigated and a fix was rolled out in late October 2023; the reporter confirmed multiple clean deployments afterward and closed the issue. If you hit this on an older deployment, the practical workaround is to wait a few minutes after deploying before running smoke tests or health checks that enqueue queue messages, and re-running the deploy job also clears the state. Source: https://github.com/denoland/deploy_feedback/issues/516

Source: https://github.com/denoland/deploy_feedback/issues/516