release-engineering / ubi-population-tool

A tool for populating UBI repositories.
GNU General Public License v3.0
3 stars 14 forks source link

Fixup: still dumps exception instead of simple log #198

Closed amcmahon-rh closed 1 year ago

amcmahon-rh commented 1 year ago

The main issue was resolved, in that we were trying to access a value which wasn't present. However, we should return None and allow the UbiRepoSet class to raise a RepoMissing exception, which is already captured and logged.

codecov[bot] commented 1 year ago

Codecov Report

Base: 97.25% // Head: 97.25% // No change to project coverage :thumbsup:

Coverage data is based on head (a5ba93d) compared to base (e5addbb). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #198 +/- ## ======================================= Coverage 97.25% 97.25% ======================================= Files 7 7 Lines 1055 1055 ======================================= Hits 1026 1026 Misses 29 29 ``` | [Impacted Files](https://codecov.io/gh/release-engineering/ubi-population-tool/pull/198?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=release-engineering) | Coverage Δ | | |---|---|---| | [ubipop/\_\_init\_\_.py](https://codecov.io/gh/release-engineering/ubi-population-tool/pull/198/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=release-engineering#diff-dWJpcG9wL19faW5pdF9fLnB5) | `94.60% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=release-engineering). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=release-engineering)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

amcmahon-rh commented 1 year ago

An alternative approach would be to keep the exception and add PopulationSourceMissing to the caught exceptions. However, allowing the UbiRepoSet class to take care of it will give logs on which repo specifically is missing.

amcmahon-rh commented 1 year ago

run tests

rbikar commented 1 year ago

@amcmahon-rh Please rebase on current master, there is py27 CI fix.