DSD-DBS / polarion-rest-api-client

An API Client for the Polarion REST API.
1 stars 0 forks source link

Fix request size #4

Closed micha91 closed 1 year ago

micha91 commented 1 year ago

With this PR we increase the default maximum batch size for the creation of WorkItems as well as WorkItemLinks to 100. In addition we now split WorkItems into smaller batches, if the WorkItems are to big to create them in one batch. The maximum content size will default to 2MB. WorkItems will be split in a way that a batch of WorkItems will never exceed an amount of 100, but also will never exceed a content size of 2MB. If a single WorkItem is already to big to create it in a batch of 1, we will log an error. @ewuerger Shall we throw an exception instead?

micha91 commented 1 year ago

You (@micha91) claimed that if we encounter a single WorkItem which exceeds the max-content size an error is logged. I didn't find the loc where this happens. Can you point me to it?

I guess in that scenario using the attachment routine is something for a future PR and shouldn't happen here. Keeping PRs reasonable short.

We now raise an exception instead (it's related to this conversation). As soon as as you mark it as resolved, I will also adjust the PR description.

micha91 commented 1 year ago

I gave two different tools (pyment and docconvert) a try to migrate the google styled doc strings of the auto generated code to numpy and they both failed really hard. As there is a new version of the code generator available, I would like to integrate that one first in a separate PR. In that PR I will also check, how much effort it would take to adjust the doc strings in the templates.