yast / yast-yast2

YaST module yast2
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
54 stars 44 forks source link

Handle release notes error #1205

Closed imobachgs closed 2 years ago

imobachgs commented 2 years ago

Related to bsc#1193148.

Do not crash when it is not possible to fetch the release notes package. It does not fix the real issue (why is the release notes package missing?), but at least the installer does not crash.

Details

The initial fix was rather easy: just catching PackageDownloader::FetchError and PackageExtractor::ExtractionFailed. However, these exceptions look like an implementation detail from the outside: the caller needs to know that PackageExtractor and PackageDownloader are used by Product#download.

So after a short discussion with @ancorgs, he suggested following the same approach as Y2Storage: define a set of domain-specific errors. So, now, you do not know who raise the exception, but the error itself.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.003%) to 41.075% when pulling 5cc2434ef4623f987a16047f66a929e2cbf887e7 on handle-release-notes-error into f2d95945f98ae50c732141b749e9ecca21a19e4a on master.

imobachgs commented 2 years ago

I am not bumping the version because I plan to release another fix today.

yast-bot commented 2 years ago

:heavy_check_mark: Public Jenkins job #332 successfully finished :heavy_check_mark: Created OBS submit request #934982