Skip to content

Comments

fix: await drain when waitUntil is unavailable#100

Merged
HugoRCD merged 3 commits intomainfrom
fix/await-drain-serverless
Feb 21, 2026
Merged

fix: await drain when waitUntil is unavailable#100
HugoRCD merged 3 commits intomainfrom
fix/await-drain-serverless

Conversation

@HugoRCD
Copy link
Owner

@HugoRCD HugoRCD commented Feb 21, 2026

This pull request improves the reliability of log draining in serverless and edge environments by ensuring that drain operations are properly awaited when waitUntil is not available. The changes update both the Nitro v3 and v2 plugins to prevent lost logs and clarify the handling of background log draining.

@HugoRCD HugoRCD self-assigned this Feb 21, 2026
@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment, Open in v0 Feb 21, 2026 2:25pm

@github-actions github-actions bot added the bug Something isn't working label Feb 21, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

Thank you for following the naming conventions! 🙏

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 21, 2026

npm i https://pkg.pr.new/evlog@100
npm i https://pkg.pr.new/@evlog/nuxthub@100

commit: 06c1e59

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves evlog’s log-draining reliability in edge/serverless runtimes by ensuring drain work is not dropped when waitUntil isn’t available.

Changes:

  • Nitro v2 plugin: await drain as a fallback when no waitUntil exists.
  • Nitro v3 plugin: make drain hook async, schedule via waitUntil when available, otherwise await drain; update call site to await.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
packages/evlog/src/nitro/plugin.ts Adds a no-waitUntil fallback that awaits drain to reduce lost logs.
packages/evlog/src/nitro-v3/plugin.ts Refactors drain hook to be awaitable and adds the same no-waitUntil fallback behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HugoRCD HugoRCD merged commit 46c9b44 into main Feb 21, 2026
4 of 5 checks passed
@HugoRCD HugoRCD deleted the fix/await-drain-serverless branch February 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant