On Sun, Jan 5, 2025 at 12:11 PM Albert Astals Cid <aa...@kde.org> wrote:

> knewstuff - 2nd week
>  * https://invent.kde.org/frameworks/knewstuff/-/pipelines/856702
>   * knewstuff-atticaprovidertest is failing
>

Something changed server side? Although our code is also meh.

https://invent.kde.org/frameworks/knewstuff/-/blob/8e0c4d4042ab7ef5941ffbb270433576b6876028/src/core/provider.h#L89
https://invent.kde.org/frameworks/knewstuff/-/blob/8e0c4d4042ab7ef5941ffbb270433576b6876028/src/attica/atticarequester.cpp#L203
https://invent.kde.org/frameworks/attica/-/blob/ce4b34e1906c272df905f8b7833c28178f230b52/src/provider.h#L608

We coerce an int that uses -1 to indicate something (it's not documented. I
am also not sure what it could mean -- give me any page? give me the last
page [but why would that be the default value]? give me no page? give me
all pages? not initialized [but then which page should the request get]?)
into an unsigned 4294967295 which the server then rejects as

<ocs><meta><status>failed</status><statuscode>400</statuscode><message>Page
out of range</message></meta></ocs>

I'm a bit unsure how to best deal with this. Our default value of -1
doesn't really make sense to me, maybe we should just make it 0 or at least
std::max(0, page) to preserve it as uninitialized state? The entire
situation also leaves us also with a broader problem of how to reconcile
knewstuff having an int page and attica having an unsigned page :|

HS

Reply via email to