Skip to content

fix: lower max batch size from 2000 to 200 - #507

Merged
gibiw merged 1 commit into
mainfrom
fix/batch-size-limit-200
Aug 25, 2026
Merged

fix: lower max batch size from 2000 to 200#507
gibiw merged 1 commit into
mainfrom
fix/batch-size-limit-200

Conversation

@cskmnrpt

Copy link
Copy Markdown
Contributor

Lowers the batch-size ceiling in qase-python-commons from 2000 to 200.

What changed

  • qase-python-commons/src/qase/commons/models/config/batch.pyset_size rejects a size above 200. The old message said "less than 2000" while the check tested > 2000; the new wording matches the check.
  • qase-python-commons/src/qase/commons/reporters/testops.py and testops_multi.py — clamp with min(200, ...).
  • qase-pytest/docs/UPGRADE.md and qase-robotframework/docs/UPGRADE.md — state the 1-200 range.

The default stays 200, so no user on defaults is affected.

Tests

qase-python-commons suite: 243 passed, 4 skipped.

Why

TMS-196 lowers the bulk-results cap from 2000 to 200 results per request. Very large batches arrive as a single spike in the result-processing queue and delay processing for every customer, including runs that report a handful of results at a time. Fewer than 1% of batches exceed 200 today.

This PR removes the stale 2000 from this repository. Server-side enforcement lands separately in the app and specs repositories.

Flags for the reviewer

  1. Missing clamps. Only Java and Python validate the configured batch size at all. JavaScript, C#, Go, qasectl and PHP pass a configured value straight to the API, so a user who set 500 gets an HTTP 413 and lost results instead of a local warning. Adding a clamp is a separate call — your decision whether and when.
  2. Generated API clients still say 2000. The maxItems: 2000 constraint and the "more than 2,000 results" endpoint description are generated from the v1 OpenAPI spec into every client (qase-api-client, qase-php-client, and the vendored clients in this and the other language repos). They change by regenerating from the spec, not by hand. Note qase-javascript carries two generated trees (qase-api-client/ and qaseio/src/generated/), so a partial regeneration leaves one stale.

Full cross-repo inventory of every mention, including an org-wide sweep of all 163 qase-tms repositories, is available on request.

TMS-196 lowers the bulk-results API cap to 200 results per request.

- BatchConfig.set_size now rejects a size above 200; the message wording
  also matches the check, which previously said "less than 2000" while
  testing for "> 2000"
- Both TestOps reporters clamp with min(200, ...) instead of min(2000, ...)
- pytest and robotframework UPGRADE docs state the 1-200 range

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gibiw
gibiw merged commit 8f4e903 into main Aug 25, 2026
37 checks passed
@gibiw
gibiw deleted the fix/batch-size-limit-200 branch August 25, 2026 10:37
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