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

checkconstraints API call does not account for overwrite/conditions #8397

Open
StefanBruens opened this issue Sep 19, 2019 · 2 comments
Open
Labels
Backend Things regarding the OBS backend Bug

Comments

@StefanBruens
Copy link

osc checkconstraints only uses "toplevel" constraints

When I try to figure out the set of workers, osc checkconstraints ignores any <overwrite><conditions>...

Expected Result

checkconstraints should return the correct set of workers.

How to Reproduce

osc checkconstraints home:StefanBruens:branches:Emulators mame openSUSE_Tumbleweed x86_64

or the mostly equivalent API call:

osc api -X POST '/worker?cmd=checkconstraints&project=home:StefanBruens:branches:Emulators&package=mame&repository=openSUSE_Tumbleweed&arch=x86_64' --file=_constraints

only use the toplevel <disk>/<memory> constraints, but ignore the overwrites.

cat _constraints

<constraints>
  <hardware>
    <memory>
      <size unit="G">10</size>
    </memory>
  </hardware>

  <overwrite>
    <conditions>
      <arch>x86_64</arch>
    </conditions>
    <hardware>
      <memory>
        <size unit="G">16</size>
      </memory>
    </hardware>
  </overwrite>
</constraints>

When the toplevel memory (10G) is varied, the worker list returned changes accordingly, but the x86_64 overwrite (16G) is always ignored.

@StefanBruens
Copy link
Author

Relevant code fragment:

sub overwriteconstraints {

@tserong
Copy link
Member

tserong commented May 24, 2023

AFAICT osc checkconstraints also doesn't take into account #!BuildConstraint in spec files (see openSUSE/obs-docu#285)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend Bug
Projects
None yet
Development

No branches or pull requests

3 participants