Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand and deleted are boolean parameters in the /source/<project> GET command #106

Closed
boiko opened this issue Oct 11, 2022 · 4 comments · Fixed by #107
Closed

expand and deleted are boolean parameters in the /source/<project> GET command #106

boiko opened this issue Oct 11, 2022 · 4 comments · Fixed by #107

Comments

@boiko
Copy link
Collaborator

boiko commented Oct 11, 2022

If deleted is not handle as a boolean, when listing projects which have multibuild packages, all variants are returned as results, which is far from the intended behavior.

So deleted and expand should be treated as boolean parameters in the context of listing project packages.

boiko added a commit to boiko/osc-tiny that referenced this issue Oct 11, 2022
…of a project

This means treating those parameters as boolean when calling GET /source/<project>/

Closes SUSE#106
@crazyscientist
Copy link
Contributor

crazyscientist commented Oct 12, 2022

WTF? When was this changed?

All the work I did on osc-tiny was related to workarounds about query parameters. The API docs indicated that for this endpoint deleted and expand are no boolean params (in the sense of the OBS API, i.e. flags) but actual boolean params (represented by the values 0 and 1).

It's even the very same endpoint that I complained about in openSUSE/open-build-service#9715.

@boiko
Copy link
Collaborator Author

boiko commented Oct 13, 2022

WTF? When was this changed?
Not sure if it was changed, but I tried out the use case that drove this whole discussion and it was still broken (listing packages of a project without including the possible multibuild variants)

All the work I did on osc-tiny was related to workarounds about query parameters. The API docs indicated that for this endpoint deleted and expand are no boolean params (in the sense of the OBS API, i.e. flags) but actual boolean params (represented by the values 0 and 1).

It's even the very same endpoint that I complained about in openSUSE/open-build-service#9715.

Yep, it is, that's how I spotted the problem.

@crazyscientist
Copy link
Contributor

Ah, yes, this endpoint expected boolean flags when I tested it over two months ago, too. But when I discovered that there are also parameters that expect boolean values, I only converted those to flags, which are explicitly declared as bool in the API docs.

Guess what: This particular API endpoint does not declare these params as bool. Mystery solved...

@crazyscientist
Copy link
Contributor

Next attempt: openSUSE/open-build-service#13215

crazyscientist pushed a commit that referenced this issue Oct 14, 2022
…of a project (closes #106)(#107)

This means treating those parameters as boolean when calling GET /source/<project>/
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 a pull request may close this issue.

2 participants