Repository navigation
Clean up newly created task rows after schedule creation failure - #1102
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When schedule creation rejects or returns no usable ID, a newly inserted task row currently remains even though creation failed. Attempt to delete only that new row before rethrowing the original failure. A cleanup failure is logged without replacing the scheduling error.
This is the separate cleanup slice of original #291; the cron parser fix is already released in #1100 and unchanged. Preserve current error identity/text instead of the old patch's new prefix. Successful results, time zone forwarding, auth, ownership, plan/cadence and worker behavior remain unchanged. Existing isolated tests mock the newly imported database helper.
This is best-effort local cleanup, not a transaction with Trigger. A network rejection/missing response ID does not prove no remote schedule was created; no unknown schedule is located/deleted. Initial insert/plan failures and failures saving the returned schedule association retain existing behavior. No historical repair, migration, new worker/job, dependency, billing or model change.
Validation: baseline 249 tests/37 files; new red fixture four failed/five passed; all nine cleanup tests green. Broader tasks/MCP/plans/scheduler/contracts suite: 483 passed/61 files. Lint and changed formatting pass. Whole-project TypeScript retains the same 207 pre-existing diagnostics byte-for-byte. Independent review at the exact head: no actionable Spec or Standards findings. Fresh CI: 7,372 tests passed/15 skipped; 1,301 files passed/13 skipped; response-contract type check, lint, format, compatibility and Vercel preview all passed. No live database delete, provider schedule/job, customer action, paid operation or manual deployment was performed.