Chunk rows to max allowed size in table batch delete endpoint#2380
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes OpenOps Tables batch row deletion against Baserow by chunking rowIds into batches of 200 (Baserow’s documented max length), preventing 400 validation errors when deleting more than 200 rows in one call.
Changes:
- Update
batchDeleteRowsto send multiplebatch-deleterequests, each with up toMAX_BATCH_ROWS(200) row IDs. - Add a unit test ensuring 450 IDs are split into 3 requests (200/200/50), mirroring existing create/update chunking behavior.
Blocking
None
Non-blocking
None
Merge recommendation
Ready to merge
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/openops/src/lib/openops-tables/rows.ts |
Chunk batchDeleteRows requests to respect Baserow’s 200-item limit. |
packages/openops/test/openops-tables/rows.test.ts |
Add coverage verifying delete chunking behavior across multiple requests. |
MarceloRGonc
approved these changes
Jun 25, 2026
|
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.



Fixes OPS-4566
Additional Notes
Problem
Baserow enforces a batch size limit of 200 on the batch-delete endpoint (items list max_length=200). When a campaign runs with a savings threshold enabled and more than 200 opportunities fall below it, batchDeleteRows sent all row IDs in a single request, which Baserow rejected with 400 ERROR_REQUEST_BODY_VALIDATION ("no more than 200 elements").
The error propagated up uncaught and aborted handleDiscoveryCompletion before it reset needsDiscoveryRefresh, so the rows were never pruned and the campaign got stuck asking the user to refresh. Hit in the Informa env on the "AWS - Rightsize EBS Volumes" campaign (the first to exceed 200 sub-threshold rows).
Fix
Chunk the row IDs into batches of at most 200 when calling the batch-delete endpoint, mirroring the existing chunking in batchCreateRows/batchUpdateRows.