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

API inconsistency of the GET /source/{prj_name} route with deleted=0 parameter showing multibuild packages #16911

Open
dcermak opened this issue Oct 2, 2024 · 6 comments · May be fixed by #16912
Assignees
Labels
Bug Frontend Things related to the OBS RoR app P2 If possible, assign this to yourself and fix it ASAP

Comments

@dcermak
Copy link
Contributor

dcermak commented Oct 2, 2024

Issue Description

The GET /source/{prj_name} is inconsistent when it comes to the deleted=0 parameter. Omitting the parameter lists only source packages but adding it includes multibuild flavors

Expected Result

The output of GET /source/{prj_name} and GET /source/{prj_name}?deleted=0 should be the same.

How to Reproduce

$ osc api '/source/devel:microos'|grep ":"|wc -l
0
$ osc api '/source/devel:microos?deleted=0'|grep ":"|wc -l
2

Additional Info

This appears to impact interconnect in some way as well:

$ osc api '/source/devel:BCI:SLE-15-SP6'|grep ":"|wc -l
0

while there are multibuild flavors via interconnect on IBS:

$ isc api '/source/openSUSE.org:devel:BCI:SLE-15-SP6'|grep ":"|wc -l
2
@hennevogel hennevogel added Bug Frontend Things related to the OBS RoR app labels Oct 2, 2024
@hennevogel
Copy link
Member

Does this have some impact for something you do?

@dcermak
Copy link
Contributor Author

dcermak commented Oct 2, 2024

Does this have some impact for something you do?

yes, especially the last one is annoying as I get different results over interconnect

@hennevogel hennevogel added the P2 If possible, assign this to yourself and fix it ASAP label Oct 2, 2024
@eduardoj
Copy link
Member

eduardoj commented Oct 2, 2024

Related to already closed #9715.

danidoni added a commit to danidoni/open-build-service that referenced this issue Oct 2, 2024
This way `?delete=0` and `?` behaves consistently, and only `?delete=1`
activates the behaviour for deleted projects

Fixes openSUSE#16911
@danidoni danidoni linked a pull request Oct 2, 2024 that will close this issue
@adrianschroeter
Copy link
Member

delete=0 is currently used as workaround to get the backend answer, so we can not do this.

Please just don't send the delete query parameter if you don't want the multibuild containers.

danidoni added a commit to danidoni/open-build-service that referenced this issue Oct 2, 2024
This way `?deleted=0` and `?` behaves consistently, and only `?deleted=1`
activates the behaviour for deleted projects

Fixes openSUSE#16911
@adrianschroeter
Copy link
Member

and use just ?deleted if you want it. This is the meanwhile documented way, there is actually no reason to add a value to it.

However, since some tools need to by-pass the api, because they require the backend informations (eg. for originpackage information), we can not become incompatible here.

@dcermak
Copy link
Contributor Author

dcermak commented Oct 2, 2024

delete=0 is currently used as workaround to get the backend answer, so we can not do this.

Wouldn't it make more sense to use a private API for this?

Please just don't send the delete query parameter if you don't want the multibuild containers.

I am not doing this, but something in the interconnect code does that for me.

Also, osc ls sends deleted=0 by default (jfyi @dmach), that's how I found this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frontend Things related to the OBS RoR app P2 If possible, assign this to yourself and fix it ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants