Skip to content

fix(libsql-driver): handle optional job data in saveJob function#23

Merged
CorentinTh merged 1 commit intomainfrom
fix-libsql-optionnal-data
Sep 13, 2025
Merged

fix(libsql-driver): handle optional job data in saveJob function#23
CorentinTh merged 1 commit intomainfrom
fix-libsql-optionnal-data

Conversation

@CorentinTh
Copy link
Copy Markdown
Member

No description provided.

@CorentinTh CorentinTh requested a review from Copilot September 13, 2025 19:56
@CorentinTh CorentinTh self-assigned this Sep 13, 2025
Copy link
Copy Markdown
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

Fix an issue in the libsql driver where scheduling jobs without data would cause problems due to improper handling of undefined/null job data during JSON serialization.

  • Modified the saveJob function in the libsql driver to handle optional job data properly by checking for existence before JSON.stringify
  • Added test coverage for scheduling jobs without data in both scheduled and periodic job scenarios

Reviewed Changes

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

File Description
packages/driver-libsql/src/driver.ts Fixed data serialization to handle null/undefined job data
packages/test-suites/tests/suites/scheduled-jobs.test.ts Added test for scheduling jobs without data
packages/test-suites/tests/suites/periodic-jobs.test.ts Added test for periodic jobs without task data
.changeset/strong-hats-brake.md Added changeset documenting the fix

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying cadence-mq-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 989971c
Status: ✅  Deploy successful!
Preview URL: https://2c0221f8.cadence-mq.pages.dev
Branch Preview URL: https://fix-libsql-optionnal-data.cadence-mq.pages.dev

View logs

@CorentinTh CorentinTh merged commit 1270282 into main Sep 13, 2025
2 checks passed
@CorentinTh CorentinTh deleted the fix-libsql-optionnal-data branch September 13, 2025 19:58
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