Skip to content

Commit

Permalink
Suppress download errors for optional (likely to fail) downloads
Browse files Browse the repository at this point in the history
backports: #9135
https://pulp.plan.io/issues/9135

fixes #9318

(cherry picked from commit 0c560f2)
  • Loading branch information
dralley committed Aug 31, 2021
1 parent 6e510e1 commit f8fd779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES/9318.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Silenced some unnecessary warnings which occurred when downloading optional files was unsuccessfully attempted.
(backported from #9135)
6 changes: 4 additions & 2 deletions pulp_rpm/app/tasks/synchronizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ async def run_repomdrecord_download(name, location_href, downloader):
for file_href in ["repodata/repomd.xml.asc", "repodata/repomd.xml.key"]:
try:
downloader = self.remote.get_downloader(
url=urlpath_sanitize(self.remote_url, file_href)
url=urlpath_sanitize(self.remote_url, file_href),
silence_errors_for_response_status_codes={403, 404},
)
result = await downloader.run()
store_metadata_for_mirroring(self.repository, result.path, file_href)
Expand All @@ -688,7 +689,8 @@ async def run_repomdrecord_download(name, location_href, downloader):
# extra files to copy, e.g. EULA, LICENSE
try:
downloader = self.remote.get_downloader(
url=urlpath_sanitize(self.remote_url, "extra_files.json")
url=urlpath_sanitize(self.remote_url, "extra_files.json"),
silence_errors_for_response_status_codes={403, 404},
)
result = await downloader.run()
store_metadata_for_mirroring(
Expand Down

0 comments on commit f8fd779

Please sign in to comment.