openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
931 stars 437 forks source link

Missing handling of scmsync packages for token operations #14930

Open darix opened 1 year ago

darix commented 1 year ago

Issue Description

NoMethodError (undefined method `+' for nil:NilClass

    package_name += ':' + options[:multibuild_flavor] if options[:multibuild_flavor]
                 ^):

app/models/token/rebuild.rb:5:in `call'
app/controllers/trigger_controller.rb:36:in `block in create'
app/models/user.rb:856:in `run_as'
app/controllers/trigger_controller.rb:31:in `create'
config/initializers/prefer_xml_over_html.rb:15:in `call'

This means app/controllers/concerns/triggerable.rb will probably need to learn about scmsync packages

also

return unless @project.links_to_remote? in def set_package(package_find_options: {}) is weird ... IMHO the code should either raise an exception. it seems code further down the chain is not expecting nil and checking for it.

Expected Result

rebuild triggered

How to Reproduce

  1. osc token --trigger <TOKEN> --operation rebuild scmsyncbasedproject python311:base

Further Information

fcrozat commented 8 months ago

This bug is preventing us to switch ALP codestream to direct rebuild with tooling in botmaster to trigger rebuild if needed (similar to Factory). And it is adding additional load to autobuild team who are currently the only one able to trigger rebuild of specific packages in ALP codestream.

Would it be possible to prioritize a fix for this ? Thanks

adrianschroeter commented 8 months ago

this should be fixed in internal system since quite some time... are you sure it is not working? Please reach out directly then.

Also, please do not use github tracker for buisiness critical requests, things may slip here.

adrianschroeter commented 8 months ago

https://github.com/openSUSE/open-build-service/pull/15433

fcrozat commented 8 months ago

this should be fixed in internal system since quite some time... are you sure it is not working? Please reach out directly then.

Since there was no action on this issue, I assume it was still in limbo. But it seems indeed to be fixed (just tested).

Thanks and will do better next time.