Skip to content

fix(Bun.SQL) test failure - #22438

Merged
Jarred-Sumner merged 1 commit into
mainfrom
ciro/bun-sql-check-queries-onclose
Sep 6, 2025
Merged

Jarred-Sumner merged 1 commit into
mainfrom
ciro/bun-sql-check-queries-onclose

Conversation

@cirospaciari

Copy link
Copy Markdown
Member

What does this PR do?

How did you verify your code works?

@robobun

robobun commented Sep 6, 2025 •

Copy link
Copy Markdown
Collaborator
Updated 9:53 PM PT - Sep 5th, 2025

❌ @cirospaciari, your commit d8c0c07 has 2 failures in Build #25197:


🧪   To try this PR locally:

bunx bun-pr 22438

That installs a local version of the PR into your bun-22438 executable, so you can run:

bun-22438 --bun

@coderabbitai

coderabbitai Bot commented Sep 6, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Optional chaining was introduced when clearing query sets during pooled connection close in MySQL and Postgres implementations: this.queries.clear() -> this.queries?.clear?.(). No other onClose logic or exported/public declarations were changed.

Changes

Cohort / File(s) Summary
Connection cleanup guard updates
src/js/internal/sql/mysql.ts, src/js/internal/sql/postgres.ts
In each Pooled*Connection.#onClose, replaced unconditional this.queries.clear() with this.queries?.clear?.() to guard against undefined this.queries or a missing clear method. All other onClose behavior unchanged; no public API changes.

Suggested reviewers

  • Jarred-Sumner

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3387804194a4cf08938016e2d125a2b84586acf1 and d8c0c07.

📒 Files selected for processing (2)
  • src/js/internal/sql/mysql.ts (1 hunks)
  • src/js/internal/sql/postgres.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/js/internal/sql/postgres.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/js/internal/sql/mysql.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Format
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ciro/bun-sql-check-queries-onclose

Comment @coderabbitai help to get the list of available commands and usage tips.

@cirospaciari
cirospaciari force-pushed the ciro/bun-sql-check-queries-onclose branch from 3387804 to d8c0c07 Compare September 6, 2025 04:02
@Jarred-Sumner
Jarred-Sumner merged commit 48b0b7f into main Sep 6, 2025
58 of 60 checks passed
@Jarred-Sumner
Jarred-Sumner deleted the ciro/bun-sql-check-queries-onclose branch September 6, 2025 04:51
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