Test Bun compatibility in CI - #1433
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c22505457
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 20 | ||
| matrix: |
There was a problem hiding this comment.
On repository-wide changes, package detection selects all 43 workspaces, so these three independent matrices can collectively start up to 215 runner jobs (86 Docker, 86 Podman, and 43 Bun), whereas the previous combined matrix was limited by max-parallel: 20. Restore an aggregate concurrency cap so this workflow cannot monopolize the organization’s runner capacity.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e431ee2f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // https://github.com/oven-sh/bun/issues/19337 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Keep the Bun-safe Redpanda HTTP tests enabled
When BUN_CI is set, this return also removes the schema-registry, admin, and REST-proxy tests, even though those tests only use fetch and never load the incompatible Kafka client; the new dynamic import in test-helper.ts already isolates that client. Guard only the message-production test so the Bun matrix still verifies these observable Redpanda behaviors.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
| // https://github.com/oven-sh/bun/issues/19337 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Run Kafka tests that do not use the native client
In the Bun job, this suite-wide return also skips the reuse check, Docker-network Kafka CLI check, and unsupported-version validation tests, none of which call assertMessageProducedAndConsumed or load the incompatible native client. Limit the guard to tests that invoke that helper so Bun continues exercising the compatible container behavior.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
| // https://github.com/oven-sh/bun/issues/19337 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Preserve the Bun-safe Kafka latest checks
When BUN_CI is set, this return suppresses the reuse test and the SASL-in-network test that uses the containerized Kafka CLI; neither path imports the incompatible native Kafka client. Guard only the tests that call assertMessageProducedAndConsumed so these observable behaviors remain covered under Bun.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
| describe("MongoDBAtlasLocalContainer", { timeout: 240_000 }, () => { | ||
| // Static loading uses node:v8 APIs unsupported by Bun before this suite can return. | ||
| // https://github.com/oven-sh/bun/issues/32501 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Retain MongoDB Atlas tests that do not import Mongoose
In the Bun matrix, this return skips the three connection-string tests before the first dynamic mongoose import, even though the linked node:v8 incompatibility cannot affect those paths. Guard only the Mongoose-dependent tests so Bun still verifies the container's connection-string behavior.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3cbeefad0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| describe("CouchbaseContainer", { timeout: 180_000 }, () => { | ||
| // https://github.com/oven-sh/bun/issues/12730 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Keep Bun-safe Couchbase tests enabled
When BUN_CI is set, this suite-wide return also removes the community-edition service validation, analytics startup, and fixed-host-port tests, none of which invoke the incompatible couchbase.Cluster client path. Guard only the client-dependent tests so Bun continues verifying these observable container behaviors.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e78a8b801
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| test: | ||
| name: "Run" | ||
| runs-on: ${{ inputs.runner }} | ||
| timeout-minutes: 20 |
There was a problem hiding this comment.
Scope the 20-minute timeout to Bun jobs
This reusable template serves the Docker and Podman matrices as well as Bun, so the new limit also shortens every existing Node job. In a slow run, packages/modules/chromadb/src/chromadb-container.test.ts permits 360 seconds per attempt while vitest.config.ts enables three CI retries, meaning a test can legitimately need up to 24 minutes before setup time; the job can therefore be cancelled during a retry that would otherwise pass. Apply the short timeout only to Bun, where it guards the documented hang, or raise the shared timeout enough to preserve the existing retry budget.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc4d6c3e9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| describe.sequential("Reaper", { timeout: 120_000 }, () => { | ||
| // The Bun core job disables Ryuk because its open stream prevents the process from exiting. | ||
| // https://github.com/oven-sh/bun/issues/23776 | ||
| if (process.env.BUN_CI) return; |
There was a problem hiding this comment.
Keep the disabled-Ryuk test enabled for Bun
When the Bun core job sets TESTCONTAINERS_RYUK_DISABLED=true, this suite-wide return also skips the test that verifies the disabled reaper can accept sessions and projects without starting Ryuk—the exact behavior on which that job relies to avoid hanging. Skip only the tests that require a live Ryuk socket so Bun continues validating its configured cleanup mode.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
Summary
node:v8API usage: Getting an error when usingmongodboven-sh/bun#32501undici.Agentis missingasync close()method oven-sh/bun#14498Verification
main: 16 tests passedCI_BUN=truetest discovery confirmed only the linked incompatible tests are omittednpm run formatnpm run lintCompatibility
This is non-breaking: it changes CI coverage and test selection only; published package code and public APIs are unchanged.