juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

Error for single package parallel build update: "Got unexpected extra arguments" #36

Closed oturpe closed 1 year ago

oturpe commented 1 year ago

Support for submitting Bodhi updates for single package parallel builds was added in #35, but it does not work properly. I am not sure if it has been broken from the start, or if something changed in the bodhi tool in the meantime.

Here is output from a run I did:

$ fbrnch parallel -F -m
...
rubygem-jekyll-4.3.0-1.fc38 job completed (3 left in layer)
rubygem-jekyll-4.3.0-1.fc36 build success
rubygem-jekyll-4.3.0-1.fc36 job completed (2 left in layer)
rubygem-jekyll-4.3.0-1.fc37 build success
rubygem-jekyll-4.3.0-1.fc37 job completed (1 left in layer)
rubygem-jekyll-4.3.0-1.fc35 build success
rubygem-jekyll-4.3.0-1.fc35 job completed (0 left in layer)

Update to 4.3.0 (rhbz#2136590)

Press Enter to use above or input update summary now; or 'no' to skip update: 
Creating Bodhi Update for rubygem-jekyll-4.3.0-1.fc35 rubygem-jekyll-4.3.0-1.fc37 rubygem-jekyll-4.3.0-1.fc36 rubygem-jekyll-4.3.0-1.fc38:
Usage: bodhi updates new [OPTIONS] BUILDS_OR_TAG
Try 'bodhi updates new --help' for help.

Error: Got unexpected extra arguments (rubygem-jekyll-4.3.0-1.fc37 rubygem-jekyll-4.3.0-1.fc36 rubygem-jekyll-4.3.0-1.fc38)
took 10 min 24 sec
fbrnch: bodhi updates new --type enhancement --severity unspecified --request testing --notes 'Update to 4.3.0 (rhbz#2136590)' --autokarma --autotime --close-bugs --bugs 2136590 rubygem-jekyll-4.3.0-1.fc35 rubygem-jekyll-4.3.0-1.fc37 rubygem-jekyll-4.3.0-1.fc36 rubygem-jekyll-4.3.0-1.fc38 failed with exit code 2

According to bodhi updates new --help, the list of packages should be comma separated. Running the bodhi updates new with that change is valid. But there is another problem, at least in my run, where I had build already built Rawhide: Since Rawhide updates are generated automatically, including Rawhide in the update results in another error:

Update for rubygem-jekyll-4.3.0-1.fc38 already exists

At least the invalid syntax should be simple to fix.

Once one of my packages needs to be updated, I can check if the "already exists" part happens also if Rawhide is not built previously. But, in any case, it would make sense to create updates for all the missing releases, even if some releases have already been handled.

juhp commented 1 year ago

I really need to do a new release soon! I have a lot of changes and fixes coming.

But I haven't tested the single package updating much I guess - so there could well be a problem still: so thanks for reporting it

juhp commented 1 year ago

Also thanks for the detailed analysis

Yeah right, filtering out the rawhide build is slightly trickier, but I have an (untested) fix now for this locally :+1: I should be able to push it quite soon.

juhp commented 1 year ago

I tested this locally with a template file update and I think that is mostly working now: maybe the only remaining piece would be checking/listing the multiple updates created.

juhp commented 1 year ago

This is all in fbrnch-1.2 released yesterday

oturpe commented 1 year ago

Tested with 1.2, works as expected: Bodhi updates created for all Fedora branches except rawhide.

juhp commented 1 year ago

Thanks