Skip to content

Enhance error handling and progress reporting in database operations#1484

Draft
Stelinkaa wants to merge 5 commits into
masterfrom
feature/mariadb-export
Draft

Enhance error handling and progress reporting in database operations#1484
Stelinkaa wants to merge 5 commits into
masterfrom
feature/mariadb-export

Conversation

@Stelinkaa

Copy link
Copy Markdown
Collaborator

No description provided.

@Stelinkaa

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dd5b4170f

ℹ️ 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".

Comment thread plugins/dbgate-plugin-mysql/src/backend/drivers.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 robustness of import/export and query streaming by propagating failures more consistently, reporting progress/errors to the UI, and reducing resource retention during long-running operations.

Changes:

  • Add backpressure-aware streaming and improved error propagation for MySQL readQuery streams.
  • Improve export UI error reporting by listening to runner-info and propagating copyStream failures as real errors.
  • Ensure Excel writer workbooks are released after writing to disk.

Reviewed changes

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

Show a summary per file
File Description
plugins/dbgate-plugin-mysql/src/backend/drivers.js Adds logging + backpressure handling to query-to-stream export path.
plugins/dbgate-plugin-excel/src/backend/writer.js Clears cached workbooks after writing to avoid retaining them in memory.
packages/web/src/utility/exportFileTools.ts Improves UI progress/error handling and passes structured progressName for hostConnection exports.
packages/api/src/shell/copyStream.js Ensures copyStream errors propagate by rethrowing after emitting error/progress messages.
packages/api/src/proc/sessionProcess.js Sends an error info message on reader failures and ensures writer closure happens once.
packages/api/src/proc/databaseConnectionProcess.js Adds eval-json-script error reporting (but needs finalizer execution on error too).
packages/api/src/controllers/databaseConnections.js Makes copyStreamError handling resilient to missing runid and emits runner progress error.

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

Comment thread packages/api/src/proc/databaseConnectionProcess.js Outdated
Comment thread packages/api/src/controllers/databaseConnections.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread plugins/dbgate-plugin-mysql/src/backend/drivers.js
Comment thread packages/api/src/controllers/databaseConnections.js
Comment thread packages/api/src/shell/copyStream.js
Comment thread packages/api/src/proc/databaseConnectionProcess.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread plugins/dbgate-plugin-mysql/src/backend/drivers.js
Comment thread packages/api/src/controllers/databaseConnections.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread packages/api/src/shell/copyStream.js
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.

2 participants