kubernetes / release

Release infrastructure for Kubernetes and related components
Apache License 2.0
480 stars 496 forks source link

`krel obs stage` proceeds with exit code zero if there's a failed package build #3632

Closed xmudrii closed 2 days ago

xmudrii commented 4 weeks ago

What happened:

We have a waiting logic implemented in krel obs stage that's waiting for all package build processes to be done. However, this waiting mechanism doesn't check if the build is successful or not. We just had the following situation:

Step #3: rpm                  x86_64     succeeded
Step #3: rpm                  aarch64    succeeded
Step #3: rpm                  ppc64le    succeeded
Step #3: rpm                  s390x      succeeded
Step #3: deb                  x86_64     succeeded
Step #3: deb                  aarch64    succeeded
Step #3: deb                  ppc64le    failed
Step #3: deb                  s390x      succeeded

Even though the ppc64le build failed, the Cloud Build job finished successfully (i.e. with exit code zero).

What you expected to happen:

Failed builds should fail the Cloud Build job to make the user aware that something is wrong.

How to reproduce it (as minimally and precisely as possible):

It's a bit more complicated as this concrete failure was random/build system related, but you can try to run krel obs stage with a broken spec file.

saschagrunert commented 4 weeks ago

Something like this could help here: https://github.com/openSUSE/osc/pull/1573

I think having it in osc as a feature is a cleaner way than parsing the status messages on our end.

saschagrunert commented 1 week ago

https://github.com/openSUSE/osc/pull/1573 got merged, waiting for a new osc release to utilize the flag.

saschagrunert commented 6 days ago

Requesting a new tag in https://github.com/openSUSE/osc/issues/1587