theforeman / theforeman-rel-eng

Release engineering scripts
0 stars 15 forks source link

create empty repository when reposync from prod fails #349

Closed evgeni closed 5 months ago

evgeni commented 5 months ago

when there is no prod repo, reposync will fail. this seems to be OK on EL7 and Fedora, but the DNF in EL8 exits non-zero in this case and this interrupts the stage repository building. just catching this error is not sufficient, as then repodiff will fail on the non-existing repository, so we have to create an empty one.

ekohl commented 5 months ago

I wonder if we can somehow detect this. Does it work to check if the target directory doesn't exist? My biggest worry is that this masks other failures

evgeni commented 5 months ago

The target directory does never exist, as it's running the job in a clean environment.

evgeni commented 5 months ago

Also, to be honest. That's how it worked until today, where we used non-EL8 hosts to run this job.

ekohl commented 5 months ago

Is there a scenario where reposync would partially sync something and this would mask it?

evgeni commented 5 months ago

most probably yes

evgeni commented 5 months ago

The "real" fix would be to set skip_if_unavailable=True on these repos, but I have no idea how to do this on the command line.

evgeni commented 5 months ago

https://github.com/theforeman/theforeman-rel-eng/pull/350