Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Oct 23, 2025

Summary

use tinypool's workerId as RSTEST_WORKER_ID.

Related Links

https://github.com/tinylibs/tinypool?tab=readme-ov-file#exports

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 23, 2025 06:34
@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 7bc7fa6
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68f9d092e2280c0008644667
😎 Deploy Preview https://deploy-preview-642--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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 changes the worker identification mechanism to use tinypool's native workerId instead of a custom counter, improving alignment with the underlying worker pool implementation.

Key Changes:

  • Renamed workerId to taskId in WorkerContext to reflect its actual purpose as a task identifier
  • Updated RSTEST_WORKER_ID environment variable to use tinypool's workerId when available, falling back to taskId

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/types/worker.ts Renamed workerId field to taskId in WorkerContext type definition
packages/core/src/runtime/worker/index.ts Updated environment variable assignment to prefer tinypool's workerId with taskId fallback
packages/core/src/pool/index.ts Updated two call sites to use taskId property name instead of workerId

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Smrtnyk
Copy link

Smrtnyk commented Oct 23, 2025

vitest got rid of tinypool in v4, due to some bugs they couldn't solve because of it

@9aoy
Copy link
Contributor Author

9aoy commented Oct 23, 2025

vitest got rid of tinypool in v4, due to some bugs they couldn't solve because of it

In the future, Rstest may have its own pool implementation. For now, let's continue using it.

@9aoy 9aoy merged commit e0510ed into main Oct 23, 2025
16 checks passed
@9aoy 9aoy deleted the tinypool/workerId branch October 23, 2025 07:48
@9aoy 9aoy mentioned this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants